" In the GUI we can always change the screen size.
if has('gui_running')
if has('gui_gtk')
- " to keep screendump size unchanged
+ " Use e.g. SetUp() and TearDown() to change "&guifont" when needed;
+ " otherwise, keep the following value to match current screendumps.
set guifont=Monospace\ 10
endif
- set columns=80 lines=25
+
+ func s:SetDefaultOptionsForGUIBuilds()
+ set columns=80 lines=25
+ endfunc
+else
+ func s:SetDefaultOptionsForGUIBuilds()
+ endfunc
endif
" Check that the screen size is at least 24 x 80 characters.
" directory after executing the test.
let save_cwd = getcwd()
+ " Permit "SetUp()" implementations to override default settings.
+ call s:SetDefaultOptionsForGUIBuilds()
+
if exists("*SetUp")
try
call SetUp()
" Test for the hlset() function
func Test_hlset()
+ " FIXME: With GVim, _current_ test cases that are run before this one may
+ " influence the result of calling "hlset(hlget())", depending on what
+ " "&guifont" is set to. For example, introduce SetUp() as follows:
+ "
+ " if CanRunVimInTerminal() && has('gui_running') && has('gui_gtk')
+ " def SetUp()
+ " set guifont=Monospace\ 10
+ " enddef
+ " endif
+ "
+ " and see "E416: Missing equal sign: ... line 4" for this test case.
let lines =<< trim END
call assert_equal(0, hlset(test_null_list()))
call assert_equal(0, hlset([]))