Mercurial > vim
comparison src/testdir/test_gui_init.vim @ 25986:34b75c77a7bd v8.2.3526
patch 8.2.3526: tests have clumsy check for X11 based GUI
Commit: https://github.com/vim/vim/commit/40bd5a15405206b130d487af0ca61b5d9b5859f8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 16 21:58:27 2021 +0100
patch 8.2.3526: tests have clumsy check for X11 based GUI
Problem: Tests have clumsy check for X11 based GUI.
Solution: Add CheckX11BasedGui.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 16 Oct 2021 23:00:05 +0200 |
parents | 08940efa6b4e |
children |
comparison
equal
deleted
inserted
replaced
25985:4cfcfd90ccdb | 25986:34b75c77a7bd |
---|---|
20 | 20 |
21 " Start the GUI now, in the foreground. | 21 " Start the GUI now, in the foreground. |
22 gui -f | 22 gui -f |
23 | 23 |
24 func Test_set_guiheadroom() | 24 func Test_set_guiheadroom() |
25 let skipped = '' | 25 CheckX11BasedGui |
26 | 26 |
27 if !g:x11_based_gui | 27 " The 'expected' value must be consistent with the value specified with |
28 let skipped = g:not_supported . 'guiheadroom' | 28 " gui_init.vim. |
29 else | 29 call assert_equal(0, &guiheadroom) |
30 " The 'expected' value must be consistent with the value specified with | |
31 " gui_init.vim. | |
32 call assert_equal(0, &guiheadroom) | |
33 endif | |
34 | |
35 if !empty(skipped) | |
36 throw skipped | |
37 endif | |
38 endfunc | 30 endfunc |
39 | 31 |
40 func Test_set_guioptions_for_M() | 32 func Test_set_guioptions_for_M() |
41 sleep 200ms | 33 sleep 200ms |
42 " Check if the 'M' option is included. | 34 " Check if the 'M' option is included. |
43 call assert_match('.*M.*', &guioptions) | 35 call assert_match('.*M.*', &guioptions) |
44 endfunc | 36 endfunc |
45 | 37 |
46 func Test_set_guioptions_for_p() | 38 func Test_set_guioptions_for_p() |
47 let skipped = '' | 39 CheckX11BasedGui |
48 | 40 |
49 if !g:x11_based_gui | 41 sleep 200ms |
50 let skipped = g:not_supported . '''p'' of guioptions' | 42 " Check if the 'p' option is included. |
51 else | 43 call assert_match('.*p.*', &guioptions) |
52 sleep 200ms | |
53 " Check if the 'p' option is included. | |
54 call assert_match('.*p.*', &guioptions) | |
55 endif | |
56 | |
57 if !empty(skipped) | |
58 throw skipped | |
59 endif | |
60 endfunc | 44 endfunc |
61 | 45 |
62 " vim: shiftwidth=2 sts=2 expandtab | 46 " vim: shiftwidth=2 sts=2 expandtab |