Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
21764:476b6faad407 | 21765:08940efa6b4e |
---|---|
22 call assert_equal(1, has('gui_running')) | 22 call assert_equal(1, has('gui_running')) |
23 endfunc | 23 endfunc |
24 | 24 |
25 " As for non-GUI, a balloon_show() test was already added with patch 8.0.0401 | 25 " As for non-GUI, a balloon_show() test was already added with patch 8.0.0401 |
26 func Test_balloon_show() | 26 func Test_balloon_show() |
27 if has('balloon_eval') | 27 CheckFeature balloon_eval |
28 " This won't do anything but must not crash either. | 28 " This won't do anything but must not crash either. |
29 call balloon_show('hi!') | 29 call balloon_show('hi!') |
30 endif | |
31 endfunc | 30 endfunc |
32 | 31 |
33 func Test_colorscheme() | 32 func Test_colorscheme() |
34 call assert_equal('16777216', &t_Co) | 33 call assert_equal('16777216', &t_Co) |
35 | 34 |
175 | 174 |
176 let &background = background_saved | 175 let &background = background_saved |
177 endfunc | 176 endfunc |
178 | 177 |
179 func Test_set_balloondelay() | 178 func Test_set_balloondelay() |
180 if !exists('+balloondelay') | 179 CheckOption balloondelay |
181 return | |
182 endif | |
183 | 180 |
184 let balloondelay_saved = &balloondelay | 181 let balloondelay_saved = &balloondelay |
185 | 182 |
186 " Check if the default value is identical to that described in the manual. | 183 " Check if the default value is identical to that described in the manual. |
187 set balloondelay& | 184 set balloondelay& |
212 | 209 |
213 let &balloondelay = balloondelay_saved | 210 let &balloondelay = balloondelay_saved |
214 endfunc | 211 endfunc |
215 | 212 |
216 func Test_set_ballooneval() | 213 func Test_set_ballooneval() |
217 if !exists('+ballooneval') | 214 CheckOption ballooneval |
218 return | |
219 endif | |
220 | 215 |
221 let ballooneval_saved = &ballooneval | 216 let ballooneval_saved = &ballooneval |
222 | 217 |
223 set ballooneval& | 218 set ballooneval& |
224 call assert_equal(0, &ballooneval) | 219 call assert_equal(0, &ballooneval) |
231 | 226 |
232 let &ballooneval = ballooneval_saved | 227 let &ballooneval = ballooneval_saved |
233 endfunc | 228 endfunc |
234 | 229 |
235 func Test_set_balloonexpr() | 230 func Test_set_balloonexpr() |
236 if !exists('+balloonexpr') | 231 CheckOption balloonexpr |
237 return | |
238 endif | |
239 | 232 |
240 let balloonexpr_saved = &balloonexpr | 233 let balloonexpr_saved = &balloonexpr |
241 | 234 |
242 " Default value | 235 " Default value |
243 set balloonexpr& | 236 set balloonexpr& |
762 let &guipty = guipty_saved | 755 let &guipty = guipty_saved |
763 endfunc | 756 endfunc |
764 | 757 |
765 func Test_encoding_conversion() | 758 func Test_encoding_conversion() |
766 " GTK supports conversion between 'encoding' and "utf-8" | 759 " GTK supports conversion between 'encoding' and "utf-8" |
767 if has('gui_gtk') | 760 CheckFeature gui_gtk |
768 let encoding_saved = &encoding | 761 let encoding_saved = &encoding |
769 set encoding=latin1 | 762 set encoding=latin1 |
770 | 763 |
771 " would be nice if we could take a screenshot | 764 " would be nice if we could take a screenshot |
772 intro | 765 intro |
773 " sets the window title | 766 " sets the window title |
774 edit SomeFile | 767 edit SomeFile |
775 | 768 |
776 let &encoding = encoding_saved | 769 let &encoding = encoding_saved |
777 endif | |
778 endfunc | 770 endfunc |
779 | 771 |
780 func Test_shell_command() | 772 func Test_shell_command() |
781 new | 773 new |
782 r !echo hello | 774 r !echo hello |