2017-02-23 19:32:47 +01:00
|
|
|
" Tests specifically for the GUI features/options that need to be set up at
|
|
|
|
" startup to take effect at runtime.
|
|
|
|
|
2017-08-13 20:26:20 +02:00
|
|
|
source shared.vim
|
2019-08-07 23:07:07 +02:00
|
|
|
source check.vim
|
|
|
|
CheckCanRunGui
|
2017-02-23 19:32:47 +01:00
|
|
|
|
|
|
|
source setup_gui.vim
|
|
|
|
|
|
|
|
func Setup()
|
|
|
|
call GUISetUpCommon()
|
|
|
|
endfunc
|
|
|
|
|
|
|
|
func TearDown()
|
|
|
|
call GUITearDownCommon()
|
|
|
|
endfunc
|
|
|
|
|
2017-03-04 13:32:10 +01:00
|
|
|
" Ignore the "failed to create input context" error.
|
2018-02-27 17:17:42 +01:00
|
|
|
call test_ignore_error('E285:')
|
2017-03-04 13:32:10 +01:00
|
|
|
|
|
|
|
" Start the GUI now, in the foreground.
|
2017-02-23 19:32:47 +01:00
|
|
|
gui -f
|
|
|
|
|
|
|
|
func Test_set_guiheadroom()
|
|
|
|
let skipped = ''
|
|
|
|
|
|
|
|
if !g:x11_based_gui
|
|
|
|
let skipped = g:not_supported . 'guiheadroom'
|
|
|
|
else
|
|
|
|
" The 'expected' value must be consistent with the value specified with
|
|
|
|
" gui_init.vim.
|
|
|
|
call assert_equal(0, &guiheadroom)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if !empty(skipped)
|
|
|
|
throw skipped
|
|
|
|
endif
|
|
|
|
endfunc
|
2017-03-12 17:10:33 +01:00
|
|
|
|
|
|
|
func Test_set_guioptions_for_M()
|
|
|
|
sleep 200ms
|
|
|
|
" Check if the 'M' option is included.
|
|
|
|
call assert_match('.*M.*', &guioptions)
|
|
|
|
endfunc
|
|
|
|
|
|
|
|
func Test_set_guioptions_for_p()
|
|
|
|
let skipped = ''
|
|
|
|
|
|
|
|
if !g:x11_based_gui
|
|
|
|
let skipped = g:not_supported . '''p'' of guioptions'
|
|
|
|
else
|
|
|
|
sleep 200ms
|
|
|
|
" Check if the 'p' option is included.
|
|
|
|
call assert_match('.*p.*', &guioptions)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if !empty(skipped)
|
|
|
|
throw skipped
|
|
|
|
endif
|
|
|
|
endfunc
|
2020-08-12 18:50:36 +02:00
|
|
|
|
|
|
|
" vim: shiftwidth=2 sts=2 expandtab
|