Mercurial > vim
annotate src/testdir/test_gui.vim @ 11050:622ed5a4925f v8.0.0414
patch 8.0.0414: balloon eval is not tested
commit https://github.com/vim/vim/commit/d5841f28d4b041830af0f3314979f9b9093d1a77
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 5 13:27:25 2017 +0100
patch 8.0.0414: balloon eval is not tested
Problem: Balloon eval is not tested.
Solution: Add a few balloon tests. (Kazunobu Kuriyama)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 05 Mar 2017 13:30:04 +0100 |
parents | 4df1647531a6 |
children | 975f54a391ec |
rev | line source |
---|---|
9756
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests specifically for the GUI |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 if !has('gui') || ($DISPLAY == "" && !has('gui_running')) |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 finish |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 endif |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
7 source setup_gui.vim |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
8 |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
9 func Setup() |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
10 call GUISetUpCommon() |
9830
6049c1f01391
commit https://github.com/vim/vim/commit/50fa8dd00c241fa0786fe92ecc02fee4e5d28e06
Christian Brabandt <cb@256bit.org>
parents:
9760
diff
changeset
|
11 endfunc |
6049c1f01391
commit https://github.com/vim/vim/commit/50fa8dd00c241fa0786fe92ecc02fee4e5d28e06
Christian Brabandt <cb@256bit.org>
parents:
9760
diff
changeset
|
12 |
6049c1f01391
commit https://github.com/vim/vim/commit/50fa8dd00c241fa0786fe92ecc02fee4e5d28e06
Christian Brabandt <cb@256bit.org>
parents:
9760
diff
changeset
|
13 func TearDown() |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
14 call GUITearDownCommon() |
9756
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 endfunc |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 " Test for resetting "secure" flag after GUI has started. |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 " Must be run first. |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 func Test_1_set_secure() |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 set exrc secure |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 gui -f |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 call assert_equal(1, has('gui_running')) |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 endfunc |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 |
11050
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
25 " As for non-GUI, a balloon_show() test was already added with patch 8.0.0401 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
26 func Test_balloon_show() |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
27 if has('balloon_eval') |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
28 " This won't do anything but must not crash either. |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
29 call balloon_show('hi!') |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
30 endif |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
31 endfunc |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
32 |
10847
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
33 func Test_getfontname_with_arg() |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
34 let skipped = '' |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
35 |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
36 if !g:x11_based_gui |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
37 let skipped = g:not_implemented |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
38 elseif has('gui_athena') || has('gui_motif') |
10847
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
39 " Invalid font name. The result should be an empty string. |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
40 call assert_equal('', getfontname('notexist')) |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
41 |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
42 " Valid font name. This is usually the real name of 7x13 by default. |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
43 let fname = '-misc-fixed-medium-r-normal--13-120-75-75-c-70-iso8859-1' |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
44 call assert_equal(fname, getfontname(fname)) |
10847
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
45 |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
46 elseif has('gui_gtk2') || has('gui_gnome') || has('gui_gtk3') |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
47 " Invalid font name. The result should be the name plus the default size. |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
48 call assert_equal('notexist 10', getfontname('notexist')) |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
49 |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
50 " Valid font name. This is usually the real name of Monospace by default. |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
51 let fname = 'Bitstream Vera Sans Mono 12' |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
52 call assert_equal(fname, getfontname(fname)) |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
53 endif |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
54 |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
55 if !empty(skipped) |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
56 throw skipped |
10847
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
57 endif |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
58 endfunc |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
59 |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
60 func Test_getfontname_without_arg() |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
61 let skipped = '' |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
62 |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
63 let fname = getfontname() |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
64 |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
65 if !g:x11_based_gui |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
66 let skipped = g:not_implemented |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
67 elseif has('gui_kde') |
10847
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
68 " 'expected' is the value specified by SetUp() above. |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
69 call assert_equal('Courier 10 Pitch/8/-1/5/50/0/0/0/0/0', fname) |
10847
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
70 elseif has('gui_athena') || has('gui_motif') |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
71 " 'expected' is DFLT_FONT of gui_x11.c. |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
72 call assert_equal('7x13', fname) |
10847
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
73 elseif has('gui_gtk2') || has('gui_gnome') || has('gui_gtk3') |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
74 " 'expected' is DEFAULT_FONT of gui_gtk_x11.c. |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
75 call assert_equal('Monospace 10', fname) |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
76 endif |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
77 |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
78 if !empty(skipped) |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
79 throw skipped |
10847
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
80 endif |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
81 endfunc |
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
82 |
10972
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
83 func Test_quoteplus() |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
84 let skipped = '' |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
85 |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
86 if !g:x11_based_gui |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
87 let skipped = g:not_supported . 'quoteplus' |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
88 else |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
89 let quoteplus_saved = @+ |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
90 |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
91 let test_call = 'Can you hear me?' |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
92 let test_response = 'Yes, I can.' |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
93 let vim_exe = exepath(v:progpath) |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
94 let testee = 'VIMRUNTIME=' . $VIMRUNTIME . '; export VIMRUNTIME;' |
11012
ae2de10e8398
patch 8.0.0395: testing the + register fails with Motif
Christian Brabandt <cb@256bit.org>
parents:
11006
diff
changeset
|
95 \ . vim_exe |
11028
4df1647531a6
patch 8.0.0403: GUI tests may fail
Christian Brabandt <cb@256bit.org>
parents:
11012
diff
changeset
|
96 \ . ' -u NONE -U NONE --noplugin --not-a-term -c ''%s''' |
11012
ae2de10e8398
patch 8.0.0395: testing the + register fails with Motif
Christian Brabandt <cb@256bit.org>
parents:
11006
diff
changeset
|
97 " Ignore the "failed to create input context" error. |
11028
4df1647531a6
patch 8.0.0403: GUI tests may fail
Christian Brabandt <cb@256bit.org>
parents:
11012
diff
changeset
|
98 let cmd = 'call test_ignore_error("E285") | ' |
4df1647531a6
patch 8.0.0403: GUI tests may fail
Christian Brabandt <cb@256bit.org>
parents:
11012
diff
changeset
|
99 \ . 'gui -f | ' |
4df1647531a6
patch 8.0.0403: GUI tests may fail
Christian Brabandt <cb@256bit.org>
parents:
11012
diff
changeset
|
100 \ . 'call feedkeys("' |
10972
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
101 \ . '\"+p' |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
102 \ . ':s/' . test_call . '/' . test_response . '/\<CR>' |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
103 \ . '\"+yis' |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
104 \ . ':q!\<CR>", "tx")' |
11028
4df1647531a6
patch 8.0.0403: GUI tests may fail
Christian Brabandt <cb@256bit.org>
parents:
11012
diff
changeset
|
105 let run_vimtest = printf(testee, cmd) |
10972
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
106 |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
107 " Set the quoteplus register to test_call, and another gvim will launched. |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
108 " Then, it first tries to paste the content of its own quotedplus register |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
109 " onto it. Second, it tries to substitute test_responce for the pasted |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
110 " sentence. If the sentence is identical to test_call, the substitution |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
111 " should succeed. Third, it tries to yank the result of the substitution |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
112 " to its own quoteplus register, and last it quits. When system() |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
113 " returns, the content of the quoteplus register should be identical to |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
114 " test_response if those quoteplus registers are synchronized properly |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
115 " with/through the X11 clipboard. |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
116 let @+ = test_call |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
117 call system(run_vimtest) |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
118 call assert_equal(test_response, @+) |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
119 |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
120 let @+ = quoteplus_saved |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
121 endif |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
122 |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
123 if !empty(skipped) |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
124 throw skipped |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
125 endif |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
126 endfunc |
488cda29455b
patch 8.0.0375: the "+ register is not tested
Christian Brabandt <cb@256bit.org>
parents:
10944
diff
changeset
|
127 |
11050
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
128 func Test_set_balloondelay() |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
129 if !exists('+balloondelay') |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
130 return |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
131 endif |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
132 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
133 let balloondelay_saved = &balloondelay |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
134 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
135 " Check if the default value is identical to that described in the manual. |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
136 set balloondelay& |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
137 call assert_equal(600, &balloondelay) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
138 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
139 " Edge cases |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
140 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
141 " XXX This fact should be hidden so that people won't be tempted to write |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
142 " plugin/TimeMachine.vim. TODO Add reasonable range checks to the source |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
143 " code. |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
144 set balloondelay=-1 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
145 call assert_equal(-1, &balloondelay) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
146 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
147 " Though it's possible to interpret the zero delay to be 'as soon as |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
148 " possible' or even 'indefinite', its actual meaning depends on the GUI |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
149 " toolkit in use after all. |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
150 set balloondelay=0 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
151 call assert_equal(0, &balloondelay) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
152 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
153 set balloondelay=1 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
154 call assert_equal(1, &balloondelay) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
155 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
156 " Since p_bdelay is of type long currently, the upper bound can be |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
157 " impractically huge and machine-dependent. Practically, it's sufficient |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
158 " to check if balloondelay works with 0xffffffff (32 bits) for now. |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
159 set balloondelay=4294967295 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
160 call assert_equal(4294967295, &balloondelay) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
161 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
162 let &balloondelay = balloondelay_saved |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
163 endfunc |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
164 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
165 func Test_set_ballooneval() |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
166 if !exists('+ballooneval') |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
167 return |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
168 endif |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
169 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
170 let ballooneval_saved = &ballooneval |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
171 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
172 set ballooneval& |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
173 call assert_equal(0, &ballooneval) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
174 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
175 set ballooneval |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
176 call assert_notequal(0, &ballooneval) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
177 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
178 set noballooneval |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
179 call assert_equal(0, &ballooneval) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
180 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
181 let &ballooneval = ballooneval_saved |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
182 endfunc |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
183 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
184 func Test_set_balloonexpr() |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
185 if !exists('+balloonexpr') |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
186 return |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
187 endif |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
188 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
189 let balloonexpr_saved = &balloonexpr |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
190 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
191 " Default value |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
192 set balloonexpr& |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
193 call assert_equal('', &balloonexpr) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
194 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
195 " User-defined function |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
196 new |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
197 func MyBalloonExpr() |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
198 return 'Cursor is at line ' . v:beval_lnum . |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
199 \', column ' . v:beval_col . |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
200 \ ' of file ' . bufname(v:beval_bufnr) . |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
201 \ ' on word "' . v:beval_text . '"' . |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
202 \ ' in window ' . v:beval_winid . ' (#' . v:beval_winnr . ')' |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
203 endfunc |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
204 setl balloonexpr=MyBalloonExpr() |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
205 setl ballooneval |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
206 call assert_equal('MyBalloonExpr()', &balloonexpr) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
207 " TODO Read non-empty text, place the pointer at a character of a word, |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
208 " and check if the content of the balloon is the smae as what is expected. |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
209 " Also, check if textlock works as expected. |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
210 setl balloonexpr& |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
211 call assert_equal('', &balloonexpr) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
212 delfunc MyBalloonExpr |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
213 bwipe! |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
214 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
215 " Multiline support |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
216 if has('balloon_multiline') |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
217 " Multiline balloon using NL |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
218 new |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
219 func MyBalloonFuncForMultilineUsingNL() |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
220 return "Multiline\nSuppported\nBalloon\nusing NL" |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
221 endfunc |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
222 setl balloonexpr=MyBalloonFuncForMultilineUsingNL() |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
223 setl ballooneval |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
224 call assert_equal('MyBalloonFuncForMultilineUsingNL()', &balloonexpr) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
225 " TODO Read non-empty text, place the pointer at a character of a word, |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
226 " and check if the content of the balloon is the smae as what is |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
227 " expected. Also, check if textlock works as expected. |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
228 setl balloonexpr& |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
229 delfunc MyBalloonFuncForMultilineUsingNL |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
230 bwipe! |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
231 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
232 " Multiline balloon using List |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
233 new |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
234 func MyBalloonFuncForMultilineUsingList() |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
235 return [ 'Multiline', 'Suppported', 'Balloon', 'using List' ] |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
236 endfunc |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
237 setl balloonexpr=MyBalloonFuncForMultilineUsingList() |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
238 setl ballooneval |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
239 call assert_equal('MyBalloonFuncForMultilineUsingList()', &balloonexpr) |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
240 " TODO Read non-empty text, place the pointer at a character of a word, |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
241 " and check if the content of the balloon is the smae as what is |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
242 " expected. Also, check if textlock works as expected. |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
243 setl balloonexpr& |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
244 delfunc MyBalloonFuncForMultilineUsingList |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
245 bwipe! |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
246 endif |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
247 |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
248 let &balloonexpr = balloonexpr_saved |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
249 endfunc |
622ed5a4925f
patch 8.0.0414: balloon eval is not tested
Christian Brabandt <cb@256bit.org>
parents:
11028
diff
changeset
|
250 |
10855
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
251 func Test_set_guifont() |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
252 let skipped = '' |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
253 |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
254 let guifont_saved = &guifont |
10855
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
255 if has('xfontset') |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
256 " Prevent 'guifontset' from canceling 'guifont'. |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
257 let guifontset_saved = &guifontset |
10855
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
258 set guifontset= |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
259 endif |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
260 |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
261 if !g:x11_based_gui |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
262 let skipped = g:not_implemented |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
263 elseif has('gui_athena') || has('gui_motif') |
10855
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
264 " Non-empty font list with invalid font names. |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
265 " |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
266 " This test is twofold: (1) It checks if the command fails as expected |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
267 " when there are no loadable fonts found in the list. (2) It checks if |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
268 " 'guifont' remains the same after the command loads none of the fonts |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
269 " listed. |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
270 let flist = &guifont |
10855
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
271 call assert_fails('set guifont=-notexist1-*,-notexist2-*') |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
272 call assert_equal(flist, &guifont) |
10855
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
273 |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
274 " Non-empty font list with a valid font name. Should pick up the first |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
275 " valid font. |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
276 set guifont=-notexist1-*,fixed,-notexist2-* |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
277 call assert_equal('fixed', getfontname()) |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
278 |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
279 " Empty list. Should fallback to the built-in default. |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
280 set guifont= |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
281 call assert_equal('7x13', getfontname()) |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
282 |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
283 elseif has('gui_gtk2') || has('gui_gnome') || has('gui_gtk3') |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
284 " For GTK, what we refer to as 'font names' in our manual are actually |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
285 " 'initial font patterns'. A valid font which matches the 'canonical font |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
286 " pattern' constructed from a given 'initial pattern' is to be looked up |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
287 " and loaded. That explains why the GTK GUIs appear to accept 'invalid |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
288 " font names'. |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
289 " |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
290 " Non-empty list. Should always pick up the first element, no matter how |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
291 " strange it is, as explained above. |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
292 set guifont=(´・ω・`)\ 12,Courier\ 12 |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
293 call assert_equal('(´・ω・`) 12', getfontname()) |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
294 |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
295 " Empty list. Should fallback to the built-in default. |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
296 set guifont= |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
297 call assert_equal('Monospace 10', getfontname()) |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
298 endif |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
299 |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
300 if has('xfontset') |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
301 let &guifontset = guifontset_saved |
10855
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
302 endif |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
303 let &guifont = guifont_saved |
10855
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
304 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
305 if !empty(skipped) |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
306 throw skipped |
10855
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
307 endif |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
308 endfunc |
0beffabed338
patch 8.0.0317: no test for setting 'guifont'
Christian Brabandt <cb@256bit.org>
parents:
10847
diff
changeset
|
309 |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
310 func Test_set_guifontset() |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
311 let skipped = '' |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
312 |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
313 if !has('xfontset') |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
314 let skipped = g:not_supported . 'xfontset' |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
315 else |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
316 let ctype_saved = v:ctype |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
317 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
318 " First, since XCreateFontSet(3) is very sensitive to locale, fonts must |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
319 " be chosen meticulously. |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
320 let font_head = '-misc-fixed-medium-r-normal--14' |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
321 |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
322 let font_aw70 = font_head . '-130-75-75-c-70' |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
323 let font_aw140 = font_head . '-130-75-75-c-140' |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
324 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
325 let font_jisx0201 = font_aw70 . '-jisx0201.1976-0' |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
326 let font_jisx0208 = font_aw140 . '-jisx0208.1983-0' |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
327 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
328 let full_XLFDs = join([ font_jisx0208, font_jisx0201 ], ',') |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
329 let short_XLFDs = join([ font_aw140, font_aw70 ], ',') |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
330 let singleton = font_head . '-*' |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
331 let aliases = 'k14,r14' |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
332 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
333 " Second, among 'locales', look up such a locale that gets 'set |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
334 " guifontset=' to work successfully with every fontset specified with |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
335 " 'fontsets'. |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
336 let locales = [ 'ja_JP.UTF-8', 'ja_JP.eucJP', 'ja_JP.SJIS' ] |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
337 let fontsets = [ full_XLFDs, short_XLFDs, singleton, aliases ] |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
338 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
339 let feasible = 0 |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
340 for locale in locales |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
341 try |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
342 exec 'language ctype' locale |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
343 catch /^Vim\%((\a\+)\)\=:E197/ |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
344 continue |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
345 endtry |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
346 let done = 0 |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
347 for fontset in fontsets |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
348 try |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
349 exec 'set guifontset=' . fontset |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
350 catch /^Vim\%((\a\+)\)\=:E\%(250\|252\|234\|597\|598\)/ |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
351 break |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
352 endtry |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
353 let done += 1 |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
354 endfor |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
355 if done == len(fontsets) |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
356 let feasible = 1 |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
357 break |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
358 endif |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
359 endfor |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
360 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
361 " Third, give a set of tests if it is found feasible. |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
362 if !feasible |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
363 let skipped = g:not_hosted |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
364 else |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
365 " N.B. 'v:ctype' has already been set to an appropriate value in the |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
366 " previous loop. |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
367 for fontset in fontsets |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
368 exec 'set guifontset=' . fontset |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
369 call assert_equal(fontset, &guifontset) |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
370 endfor |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
371 endif |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
372 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
373 " Finally, restore ctype. |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
374 exec 'language ctype' ctype_saved |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
375 endif |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
376 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
377 if !empty(skipped) |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
378 throw skipped |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
379 endif |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
380 endfunc |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
381 |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
382 func Test_set_guifontwide() |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
383 let skipped = '' |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
384 |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
385 if !g:x11_based_gui |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
386 let skipped = g:not_implemented |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
387 elseif has('gui_gtk') |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
388 let guifont_saved = &guifont |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
389 let guifontwide_saved = &guifontwide |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
390 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
391 let fc_match = exepath('fc-match') |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
392 if empty(fc_match) |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
393 let skipped = g:not_hosted |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
394 else |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
395 let &guifont = system('fc-match -f "%{family[0]} %{size}" monospace:size=10:lang=en') |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
396 let wide = system('fc-match -f "%{family[0]} %{size}" monospace:size=10:lang=ja') |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
397 exec 'set guifontwide=' . fnameescape(wide) |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
398 call assert_equal(wide, &guifontwide) |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
399 endif |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
400 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
401 let &guifontwide = guifontwide_saved |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
402 let &guifont = guifont_saved |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
403 |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
404 elseif has('gui_athena') || has('gui_motif') |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
405 " guifontwide is premised upon the xfontset feature. |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
406 if !has('xfontset') |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
407 let skipped = g:not_supported . 'xfontset' |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
408 else |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
409 let encoding_saved = &encoding |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
410 let guifont_saved = &guifont |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
411 let guifontset_saved = &guifontset |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
412 let guifontwide_saved = &guifontwide |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
413 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
414 let nfont = '-misc-fixed-medium-r-normal-*-18-120-100-100-c-90-iso10646-1' |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
415 let wfont = '-misc-fixed-medium-r-normal-*-18-120-100-100-c-180-iso10646-1' |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
416 |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
417 set encoding=utf-8 |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
418 |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
419 " Case 1: guifontset is empty |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
420 set guifontset= |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
421 |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
422 " Case 1-1: Automatic selection |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
423 set guifontwide= |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
424 exec 'set guifont=' . nfont |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
425 call assert_equal(wfont, &guifontwide) |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
426 |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
427 " Case 1-2: Manual selection |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
428 exec 'set guifontwide=' . wfont |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
429 exec 'set guifont=' . nfont |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
430 call assert_equal(wfont, &guifontwide) |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
431 |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
432 " Case 2: guifontset is invalid |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
433 try |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
434 set guifontset=-*-notexist-* |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
435 call assert_false(1, "'set guifontset=-*-notexist-*' should have failed") |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
436 catch |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
437 call assert_exception('E598') |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
438 endtry |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
439 " Set it to an invalid value brutally for preparation. |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
440 let &guifontset = '-*-notexist-*' |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
441 |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
442 " Case 2-1: Automatic selection |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
443 set guifontwide= |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
444 exec 'set guifont=' . nfont |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
445 call assert_equal(wfont, &guifontwide) |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
446 |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
447 " Case 2-2: Manual selection |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
448 exec 'set guifontwide=' . wfont |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
449 exec 'set guifont=' . nfont |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
450 call assert_equal(wfont, &guifontwide) |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
451 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
452 let &guifontwide = guifontwide_saved |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
453 let &guifontset = guifontset_saved |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
454 let &guifont = guifont_saved |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
455 let &encoding = encoding_saved |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
456 endif |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
457 endif |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
458 |
10885
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
459 if !empty(skipped) |
310834b0256a
patch 8.0.0332: GUI test fails on some systems
Christian Brabandt <cb@256bit.org>
parents:
10879
diff
changeset
|
460 throw skipped |
10879
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
461 endif |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
462 endfunc |
1fce74a5a628
patch 8.0.0329: xfontset and guifontwide are not tested
Christian Brabandt <cb@256bit.org>
parents:
10857
diff
changeset
|
463 |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
464 func Test_set_guiheadroom() |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
465 let skipped = '' |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
466 |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
467 if !g:x11_based_gui |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
468 let skipped = g:not_supported . 'guiheadroom' |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
469 else |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
470 " Since this script is to be read together with '-U NONE', the default |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
471 " value must be preserved. |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
472 call assert_equal(50, &guiheadroom) |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
473 endif |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
474 |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
475 if !empty(skipped) |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
476 throw skipped |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
477 endif |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
478 endfunc |
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
479 |
10841
5c0415a8b96e
patch 8.0.0310: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10777
diff
changeset
|
480 func Test_getwinpos() |
5c0415a8b96e
patch 8.0.0310: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10777
diff
changeset
|
481 call assert_match('Window position: X \d\+, Y \d\+', execute('winpos')) |
5c0415a8b96e
patch 8.0.0310: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10777
diff
changeset
|
482 call assert_true(getwinposx() >= 0) |
5c0415a8b96e
patch 8.0.0310: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10777
diff
changeset
|
483 call assert_true(getwinposy() >= 0) |
10847
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
484 endfunc |
10841
5c0415a8b96e
patch 8.0.0310: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10777
diff
changeset
|
485 |
9756
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
486 func Test_shell_command() |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
487 new |
9760
96667173293d
commit https://github.com/vim/vim/commit/9d5b876d458e242b8b5e44da10c5cdc6bbb7f57c
Christian Brabandt <cb@256bit.org>
parents:
9756
diff
changeset
|
488 r !echo hello |
96667173293d
commit https://github.com/vim/vim/commit/9d5b876d458e242b8b5e44da10c5cdc6bbb7f57c
Christian Brabandt <cb@256bit.org>
parents:
9756
diff
changeset
|
489 call assert_equal('hello', substitute(getline(2), '\W', '', 'g')) |
9756
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
490 bwipe! |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
491 endfunc |
10841
5c0415a8b96e
patch 8.0.0310: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10777
diff
changeset
|
492 |
5c0415a8b96e
patch 8.0.0310: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10777
diff
changeset
|
493 func Test_windowid_variable() |
10944
4e2cdce4576c
patch 8.0.0361: GUI initialisation is not sufficiently tested
Christian Brabandt <cb@256bit.org>
parents:
10885
diff
changeset
|
494 if g:x11_based_gui || has('win32') |
10841
5c0415a8b96e
patch 8.0.0310: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10777
diff
changeset
|
495 call assert_true(v:windowid > 0) |
5c0415a8b96e
patch 8.0.0310: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10777
diff
changeset
|
496 else |
5c0415a8b96e
patch 8.0.0310: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10777
diff
changeset
|
497 call assert_equal(0, v:windowid) |
5c0415a8b96e
patch 8.0.0310: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10777
diff
changeset
|
498 endif |
10847
881194ae47a1
patch 8.0.0313: not enough testing for GUI functionality
Christian Brabandt <cb@256bit.org>
parents:
10841
diff
changeset
|
499 endfunc |