blob: f7745660b9860f50fa54454b52baf357946493c2 [file] [log] [blame]
Bram Moolenaar2d6c8002016-01-03 23:31:24 +01001" Test that the system menu can be loaded.
2
Bram Moolenaar11dd8c12017-03-04 20:41:34 +01003if !has('menu')
4 finish
5endif
6
Bram Moolenaar2d6c8002016-01-03 23:31:24 +01007func Test_load_menu()
8 try
9 source $VIMRUNTIME/menu.vim
10 catch
11 call assert_false(1, 'error while loading menus: ' . v:exception)
12 endtry
Bram Moolenaar11dd8c12017-03-04 20:41:34 +010013 source $VIMRUNTIME/delmenu.vim
14endfunc
15
16func Test_translate_menu()
17 if !has('multi_lang')
18 return
19 endif
20 if !filereadable($VIMRUNTIME . '/lang/menu_de_de.latin1.vim')
21 throw 'Skipped: translated menu not found'
22 endif
23
24 set langmenu=de_de
25 source $VIMRUNTIME/menu.vim
Bram Moolenaar5558d192017-03-04 21:02:22 +010026 call assert_match('browse confirm w', execute(':menu Datei.Speichern'))
Bram Moolenaar11dd8c12017-03-04 20:41:34 +010027
28 source $VIMRUNTIME/delmenu.vim
Bram Moolenaar2d6c8002016-01-03 23:31:24 +010029endfunc