Mercurial > vim
diff src/testdir/test_gui.vim @ 21765:08940efa6b4e v8.2.1432
patch 8.2.1432: various inconsistencies in test files
Commit: https://github.com/vim/vim/commit/6d91bcb4d23b5c6a0be72c384beaf385e2d9d606
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 12 18:50:36 2020 +0200
patch 8.2.1432: various inconsistencies in test files
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 12 Aug 2020 19:00:08 +0200 |
parents | fbee68c6aab1 |
children | ff21e2962490 |
line wrap: on
line diff
--- 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()