forked from aniani/vim
patch 8.0.0361: GUI initialisation is not sufficiently tested
Problem: GUI initialisation is not sufficiently tested. Solution: Add the gui_init test. (Kazuki Kuriyama)
This commit is contained in:
35
src/testdir/test_gui_init.vim
Normal file
35
src/testdir/test_gui_init.vim
Normal file
@@ -0,0 +1,35 @@
|
||||
" Tests specifically for the GUI features/options that need to be set up at
|
||||
" startup to take effect at runtime.
|
||||
|
||||
if !has('gui') || ($DISPLAY == "" && !has('gui_running'))
|
||||
finish
|
||||
endif
|
||||
|
||||
source setup_gui.vim
|
||||
|
||||
func Setup()
|
||||
call GUISetUpCommon()
|
||||
endfunc
|
||||
|
||||
func TearDown()
|
||||
call GUITearDownCommon()
|
||||
endfunc
|
||||
|
||||
" Make sure that the tests will be done with the GUI activated.
|
||||
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
|
||||
Reference in New Issue
Block a user