diff src/testdir/test_gui.vim @ 16121:060b58b492a5 v8.1.1065

patch 8.1.1065: no test for using and deleting menu in the GUI commit https://github.com/vim/vim/commit/47cf1cc2576b576898f25cea325139bdbba90fe6 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 28 22:04:56 2019 +0100 patch 8.1.1065: no test for using and deleting menu in the GUI Problem: No test for using and deleting menu in the GUI. Solution: Add a test.
author Bram Moolenaar <Bram@vim.org>
date Thu, 28 Mar 2019 22:15:06 +0100
parents 4fac64b51d74
children 1fbb0a33b074
line wrap: on
line diff
--- a/src/testdir/test_gui.vim
+++ b/src/testdir/test_gui.vim
@@ -707,6 +707,21 @@ func Test_scrollbars()
   bwipe!
 endfunc
 
+func Test_menu()
+  " Check Help menu exists
+  let help_menu = execute('menu Help')
+  call assert_match('Overview', help_menu)
+
+  " Check Help menu works
+  emenu Help.Overview
+  call assert_equal('help', &buftype)
+  close
+
+  " Check deleting menu doesn't cause trouble.
+  aunmenu Help
+  call assert_fails('menu Help', 'E329:')
+endfunc
+
 func Test_set_guipty()
   let guipty_saved = &guipty