diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-10-19 22:36:53 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-10-19 22:36:53 +0200 |
commit | 4c5d815256099b50eca2ec5bf8f9aaa67a890211 (patch) | |
tree | 6d626537a4c82f86a43a90bec3fce98e54033949 /src/testdir/test_menu.vim | |
parent | 42a4ea10af687ca56b0810bfbb8884b37fc725b3 (diff) |
patch 8.1.0487: no menus specifically for the terminal windowv8.1.0487
Problem: No menus specifically for the terminal window.
Solution: Add :tlmenu. (Yee Cheng Chin, closes #3439) Add a menu test.
Diffstat (limited to 'src/testdir/test_menu.vim')
-rw-r--r-- | src/testdir/test_menu.vim | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/testdir/test_menu.vim b/src/testdir/test_menu.vim index 055d944b15..6462d5196c 100644 --- a/src/testdir/test_menu.vim +++ b/src/testdir/test_menu.vim @@ -30,3 +30,37 @@ func Test_translate_menu() source $VIMRUNTIME/delmenu.vim endfunc + +func Test_menu_commands() + nmenu 2 Test.FooBar :let g:did_menu = 'normal'<CR> + vmenu 2 Test.FooBar :let g:did_menu = 'visual'<CR> + smenu 2 Test.FooBar :let g:did_menu = 'select'<CR> + omenu 2 Test.FooBar :let g:did_menu = 'op-pending'<CR> + tlmenu 2 Test.FooBar :let g:did_menu = 'terminal'<CR> + imenu 2 Test.FooBar :let g:did_menu = 'insert'<CR> + cmenu 2 Test.FooBar :let g:did_menu = 'cmdline'<CR> + emenu n Test.FooBar + call assert_equal('normal', g:did_menu) + emenu v Test.FooBar + call assert_equal('visual', g:did_menu) + emenu s Test.FooBar + call assert_equal('select', g:did_menu) + emenu o Test.FooBar + call assert_equal('op-pending', g:did_menu) + emenu t Test.FooBar + call assert_equal('terminal', g:did_menu) + emenu i Test.FooBar + call assert_equal('insert', g:did_menu) + emenu c Test.FooBar + call assert_equal('cmdline', g:did_menu) + + aunmenu Test.FooBar + tlunmenu Test.FooBar + call assert_fails('emenu n Test.FooBar', 'E334:') + + nmenu 2 Test.FooBar.Child :let g:did_menu = 'foobar'<CR> + call assert_fails('emenu n Test.FooBar', 'E333:') + nunmenu Test.FooBar.Child + + unlet g:did_menu +endfun |