annotate src/testdir/test_menu.vim @ 19517:738a4fe2c8c5 v8.2.0316

patch 8.2.0316: ex_getln.c code has insufficient test coverage Commit: https://github.com/vim/vim/commit/8d588ccee57390aa01c2395fc599bbe6506ee13a Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 25 21:47:45 2020 +0100 patch 8.2.0316: ex_getln.c code has insufficient test coverage Problem: ex_getln.c code has insufficient test coverage. Solution: Add more tests. Fix a problem. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5693)
author Bram Moolenaar <Bram@vim.org>
date Tue, 25 Feb 2020 22:00:04 +0100
parents 5bef1043abff
children da791e5c0139
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7488
6f14d7da2d8a commit https://github.com/vim/vim/commit/2d6c8002729821acc54a4de41d5c5f3d50594973
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test that the system menu can be loaded.
6f14d7da2d8a commit https://github.com/vim/vim/commit/2d6c8002729821acc54a4de41d5c5f3d50594973
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
17089
8e9e9124c7a2 patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents: 17049
diff changeset
3 source check.vim
8e9e9124c7a2 patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents: 17049
diff changeset
4 CheckFeature menu
11044
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
5
7488
6f14d7da2d8a commit https://github.com/vim/vim/commit/2d6c8002729821acc54a4de41d5c5f3d50594973
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 func Test_load_menu()
6f14d7da2d8a commit https://github.com/vim/vim/commit/2d6c8002729821acc54a4de41d5c5f3d50594973
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 try
6f14d7da2d8a commit https://github.com/vim/vim/commit/2d6c8002729821acc54a4de41d5c5f3d50594973
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 source $VIMRUNTIME/menu.vim
6f14d7da2d8a commit https://github.com/vim/vim/commit/2d6c8002729821acc54a4de41d5c5f3d50594973
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 catch
11183
1c4ebbae41d2 patch 8.0.0478: tests use assert_true(0) and assert_false(1) to report errors
Christian Brabandt <cb@256bit.org>
parents: 11048
diff changeset
10 call assert_report('error while loading menus: ' . v:exception)
7488
6f14d7da2d8a commit https://github.com/vim/vim/commit/2d6c8002729821acc54a4de41d5c5f3d50594973
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 endtry
11048
860d023f0fc8 patch 8.0.0413: menu test fails on MS-Windows using gvim
Christian Brabandt <cb@256bit.org>
parents: 11046
diff changeset
12 call assert_match('browse confirm w', execute(':menu File.Save'))
18860
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
13
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
14 let v:errmsg = ''
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
15 doautocmd LoadBufferMenu VimEnter
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
16 call assert_equal('', v:errmsg)
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
17
11044
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
18 source $VIMRUNTIME/delmenu.vim
18860
ec92ccff5c8b patch 8.1.2416: loading menus sets v:errmsg
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
19 call assert_equal('', v:errmsg)
7488
6f14d7da2d8a commit https://github.com/vim/vim/commit/2d6c8002729821acc54a4de41d5c5f3d50594973
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 endfunc
11044
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
21
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
22 func Test_translate_menu()
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
23 if !has('multi_lang')
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
24 return
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
25 endif
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
26 if !filereadable($VIMRUNTIME . '/lang/menu_de_de.latin1.vim')
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
27 throw 'Skipped: translated menu not found'
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
28 endif
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
29
11048
860d023f0fc8 patch 8.0.0413: menu test fails on MS-Windows using gvim
Christian Brabandt <cb@256bit.org>
parents: 11046
diff changeset
30 " First delete any English menus.
860d023f0fc8 patch 8.0.0413: menu test fails on MS-Windows using gvim
Christian Brabandt <cb@256bit.org>
parents: 11046
diff changeset
31 source $VIMRUNTIME/delmenu.vim
11044
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
32 set langmenu=de_de
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
33 source $VIMRUNTIME/menu.vim
11046
d48f4eeb91ec patch 8.0.0412: menu test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 11044
diff changeset
34 call assert_match('browse confirm w', execute(':menu Datei.Speichern'))
11044
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
35
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
36 source $VIMRUNTIME/delmenu.vim
eb3a2ff3309a patch 8.0.0411: menu translations don't match when case is changed.
Christian Brabandt <cb@256bit.org>
parents: 7488
diff changeset
37 endfunc
14952
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
38
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
39 func Test_menu_commands()
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
40 nmenu 2 Test.FooBar :let g:did_menu = 'normal'<CR>
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
41 vmenu 2 Test.FooBar :let g:did_menu = 'visual'<CR>
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
42 smenu 2 Test.FooBar :let g:did_menu = 'select'<CR>
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
43 omenu 2 Test.FooBar :let g:did_menu = 'op-pending'<CR>
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
44 tlmenu 2 Test.FooBar :let g:did_menu = 'terminal'<CR>
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
45 imenu 2 Test.FooBar :let g:did_menu = 'insert'<CR>
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
46 cmenu 2 Test.FooBar :let g:did_menu = 'cmdline'<CR>
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
47 emenu n Test.FooBar
18977
5bef1043abff patch 8.2.0049: command line completion not fully tested
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
48
5bef1043abff patch 8.2.0049: command line completion not fully tested
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
49 call feedkeys(":menu Test.FooB\<C-A>\<C-B>\"\<CR>", 'tx')
5bef1043abff patch 8.2.0049: command line completion not fully tested
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
50 call assert_equal('"menu Test.FooBar', @:)
5bef1043abff patch 8.2.0049: command line completion not fully tested
Bram Moolenaar <Bram@vim.org>
parents: 18860
diff changeset
51
14952
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
52 call assert_equal('normal', g:did_menu)
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
53 emenu v Test.FooBar
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
54 call assert_equal('visual', g:did_menu)
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
55 emenu s Test.FooBar
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
56 call assert_equal('select', g:did_menu)
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
57 emenu o Test.FooBar
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
58 call assert_equal('op-pending', g:did_menu)
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
59 emenu t Test.FooBar
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
60 call assert_equal('terminal', g:did_menu)
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
61 emenu i Test.FooBar
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
62 call assert_equal('insert', g:did_menu)
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
63 emenu c Test.FooBar
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
64 call assert_equal('cmdline', g:did_menu)
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
65
16541
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
66 nunmenu Test.FooBar
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
67 call assert_fails('emenu n Test.FooBar', 'E335: Menu not defined for Normal mode')
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
68 vunmenu Test.FooBar
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
69 call assert_fails('emenu v Test.FooBar', 'E335: Menu not defined for Visual mode')
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
70 vmenu 2 Test.FooBar :let g:did_menu = 'visual'<CR>
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
71 sunmenu Test.FooBar
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
72 call assert_fails('emenu s Test.FooBar', 'E335: Menu not defined for Select mode')
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
73 ounmenu Test.FooBar
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
74 call assert_fails('emenu o Test.FooBar', 'E335: Menu not defined for Op-pending mode')
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
75 iunmenu Test.FooBar
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
76 call assert_fails('emenu i Test.FooBar', 'E335: Menu not defined for Insert mode')
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
77 cunmenu Test.FooBar
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
78 call assert_fails('emenu c Test.FooBar', 'E335: Menu not defined for Cmdline mode')
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
79 tlunmenu Test.FooBar
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
80 call assert_fails('emenu t Test.FooBar', 'E335: Menu not defined for Terminal mode')
822d00007b34 patch 8.1.1274: after :unmenu can still execute the menu with :emenu
Bram Moolenaar <Bram@vim.org>
parents: 14952
diff changeset
81
14952
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
82 aunmenu Test.FooBar
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
83 call assert_fails('emenu n Test.FooBar', 'E334:')
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
84
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
85 nmenu 2 Test.FooBar.Child :let g:did_menu = 'foobar'<CR>
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
86 call assert_fails('emenu n Test.FooBar', 'E333:')
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
87 nunmenu Test.FooBar.Child
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
88
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
89 unlet g:did_menu
405309f9dd13 patch 8.1.0487: no menus specifically for the terminal window
Bram Moolenaar <Bram@vim.org>
parents: 11183
diff changeset
90 endfun
19517
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
91
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
92 " Test for menu item completion in command line
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
93 func Test_menu_expand()
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
94 " Create the menu itmes for test
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
95 for i in range(1, 4)
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
96 let m = 'menu Xmenu.A' .. i .. '.A' .. i
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
97 for j in range(1, 4)
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
98 exe m .. 'B' .. j .. ' :echo "A' .. i .. 'B' .. j .. '"' .. "<CR>"
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
99 endfor
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
100 endfor
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
101 set wildmenu
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
102
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
103 " Test for <CR> selecting a submenu
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
104 call feedkeys(":emenu Xmenu.A\<Tab>\<CR>\<Right>x\<BS>\<C-B>\"\<CR>", 'xt')
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
105 call assert_equal('"emenu Xmenu.A1.A1B2', @:)
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
106
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
107 " Test for <Down> selecting a submenu
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
108 call feedkeys(":emenu Xmenu.A\<Tab>\<Right>\<Right>\<Down>" ..
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
109 \ "\<C-A>\<C-B>\"\<CR>", 'xt')
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
110 call assert_equal('"emenu Xmenu.A3.A3B1 A3B2 A3B3 A3B4', @:)
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
111
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
112 " Test for <Up> to go up a submenu
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
113 call feedkeys(":emenu Xmenu.A\<Tab>\<Down>\<Up>\<Right>\<Right>" ..
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
114 \ "\<Left>\<Down>\<C-A>\<C-B>\"\<CR>", 'xt')
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
115 call assert_equal('"emenu Xmenu.A2.A2B1 A2B2 A2B3 A2B4', @:)
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
116
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
117 " Test for <Up> to go up a menu
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
118 call feedkeys(":emenu Xmenu.A\<Tab>\<Down>\<Up>\<Up>\<Up>" ..
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
119 \ "\<C-A>\<C-B>\"\<CR>", 'xt')
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
120 call assert_equal('"emenu Buffers. Xmenu.', @:)
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
121
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
122 set wildmenu&
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
123 unmenu Xmenu
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
124 endfunc
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
125
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 18977
diff changeset
126 " vim: shiftwidth=2 sts=2 expandtab