diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-12 18:50:36 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-12 18:50:36 +0200 |
commit | 6d91bcb4d23b5c6a0be72c384beaf385e2d9d606 (patch) | |
tree | 0f4129e5f6e049ce5313520239de270cd9389580 /src/testdir/test_gui.vim | |
parent | c3d6e8a46a8fc5de622e8df9dbd25edd03e00c5b (diff) |
patch 8.2.1432: various inconsistencies in test filesv8.2.1432
Problem: Various inconsistencies in test files.
Solution: Add modelines where they were missing. Use Check commands instead
of silently skipping over tests. Adjust indents and comments.
(Ken Takata, closes #6695)
Diffstat (limited to 'src/testdir/test_gui.vim')
-rw-r--r-- | src/testdir/test_gui.vim | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/src/testdir/test_gui.vim b/src/testdir/test_gui.vim index 808ba5d8b8..c01a290ee3 100644 --- a/src/testdir/test_gui.vim +++ b/src/testdir/test_gui.vim @@ -24,10 +24,9 @@ endfunc " As for non-GUI, a balloon_show() test was already added with patch 8.0.0401 func Test_balloon_show() - if has('balloon_eval') - " This won't do anything but must not crash either. - call balloon_show('hi!') - endif + CheckFeature balloon_eval + " This won't do anything but must not crash either. + call balloon_show('hi!') endfunc func Test_colorscheme() @@ -177,9 +176,7 @@ func Test_set_background() endfunc func Test_set_balloondelay() - if !exists('+balloondelay') - return - endif + CheckOption balloondelay let balloondelay_saved = &balloondelay @@ -214,9 +211,7 @@ func Test_set_balloondelay() endfunc func Test_set_ballooneval() - if !exists('+ballooneval') - return - endif + CheckOption ballooneval let ballooneval_saved = &ballooneval @@ -233,9 +228,7 @@ func Test_set_ballooneval() endfunc func Test_set_balloonexpr() - if !exists('+balloonexpr') - return - endif + CheckOption balloonexpr let balloonexpr_saved = &balloonexpr @@ -764,17 +757,16 @@ endfunc func Test_encoding_conversion() " GTK supports conversion between 'encoding' and "utf-8" - if has('gui_gtk') - let encoding_saved = &encoding - set encoding=latin1 + CheckFeature gui_gtk + let encoding_saved = &encoding + set encoding=latin1 - " would be nice if we could take a screenshot - intro - " sets the window title - edit SomeFile + " would be nice if we could take a screenshot + intro + " sets the window title + edit SomeFile - let &encoding = encoding_saved - endif + let &encoding = encoding_saved endfunc func Test_shell_command() |