Mercurial > vim
comparison src/testdir/test_gui.vim @ 19932:2c4d9ca33769 v8.2.0522
patch 8.2.0522: several errors are not tested for
Commit: https://github.com/vim/vim/commit/ee4e0c1e9a81cb5d96e0060203a9033c2f28588e
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Apr 6 21:35:05 2020 +0200
patch 8.2.0522: several errors are not tested for
Problem: Several errors are not tested for.
Solution: Add tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5892)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 06 Apr 2020 21:45:31 +0200 |
parents | 546bdeef35f1 |
children | 3d1de9093c01 |
comparison
equal
deleted
inserted
replaced
19931:db6b095f4073 | 19932:2c4d9ca33769 |
---|---|
386 " Empty list. Should fallback to the built-in default. | 386 " Empty list. Should fallback to the built-in default. |
387 set guifont= | 387 set guifont= |
388 call assert_equal('Monospace 10', getfontname()) | 388 call assert_equal('Monospace 10', getfontname()) |
389 endif | 389 endif |
390 | 390 |
391 if has('win32') | |
392 " Invalid font names are accepted in GTK GUI | |
393 call assert_fails('set guifont=xa1bc23d7f', 'E596:') | |
394 endif | |
395 | |
391 if has('xfontset') | 396 if has('xfontset') |
392 let &guifontset = guifontset_saved | 397 let &guifontset = guifontset_saved |
393 endif | 398 endif |
394 let &guifont = guifont_saved | 399 let &guifont = guifont_saved |
395 | 400 |
399 endfunc | 404 endfunc |
400 | 405 |
401 func Test_set_guifontset() | 406 func Test_set_guifontset() |
402 CheckFeature xfontset | 407 CheckFeature xfontset |
403 let skipped = '' | 408 let skipped = '' |
409 | |
410 call assert_fails('set guifontset=*', 'E597:') | |
404 | 411 |
405 let ctype_saved = v:ctype | 412 let ctype_saved = v:ctype |
406 | 413 |
407 " First, since XCreateFontSet(3) is very sensitive to locale, fonts must | 414 " First, since XCreateFontSet(3) is very sensitive to locale, fonts must |
408 " be chosen meticulously. | 415 " be chosen meticulously. |
466 throw skipped | 473 throw skipped |
467 endif | 474 endif |
468 endfunc | 475 endfunc |
469 | 476 |
470 func Test_set_guifontwide() | 477 func Test_set_guifontwide() |
478 call assert_fails('set guifontwide=*', 'E533:') | |
471 let skipped = '' | 479 let skipped = '' |
472 | 480 |
473 if !g:x11_based_gui | 481 if !g:x11_based_gui |
474 let skipped = g:not_implemented | 482 let skipped = g:not_implemented |
475 elseif has('gui_gtk') | 483 elseif has('gui_gtk') |
783 | 791 |
784 func Test_set_term() | 792 func Test_set_term() |
785 " It's enough to check the current value since setting 'term' to anything | 793 " It's enough to check the current value since setting 'term' to anything |
786 " other than builtin_gui makes no sense at all. | 794 " other than builtin_gui makes no sense at all. |
787 call assert_equal('builtin_gui', &term) | 795 call assert_equal('builtin_gui', &term) |
796 call assert_fails('set term=xterm', 'E530:') | |
788 endfunc | 797 endfunc |
789 | 798 |
790 func Test_windowid_variable() | 799 func Test_windowid_variable() |
791 if g:x11_based_gui || has('win32') | 800 if g:x11_based_gui || has('win32') |
792 call assert_true(v:windowid > 0) | 801 call assert_true(v:windowid > 0) |