]> granicus.if.org Git - vim/commitdiff
patch 8.1.1065: no test for using and deleting menu in the GUI v8.1.1065
authorBram Moolenaar <Bram@vim.org>
Thu, 28 Mar 2019 21:04:56 +0000 (22:04 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 28 Mar 2019 21:04:56 +0000 (22:04 +0100)
Problem:    No test for using and deleting menu in the GUI.
Solution:   Add a test.

src/testdir/test_gui.vim
src/version.c

index f1f2cdd153d73e8d13d8bb6b3c0583909b9d490a..a372c1f9e28e247d268105aa32d0cd0620afebe9 100644 (file)
@@ -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
 
index b8b3c149e5553e0611f8c3cf71539ae259470b8f..be232842a6688a8e54e813c1b197746c5be58c61 100644 (file)
@@ -775,6 +775,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1065,
 /**/
     1064,
 /**/