patch 9.1.1438: tests: Test_breakindent_list_split() fails
Problem: tests: Test_breakindent_list_split() fails
(Phạm Bình An)
Solution: Always reset "&columns" and "&lines" for GUI builds
(Aliaksei Budavei)
Ensure that "&columns" and "&lines" are always set to their
default values before calling "SetUp()", if any, for EACH
test run by a GUI build to avoid yet-to-be-run tests from
inheriting possibly changed values (after window resizing)
and leading to broken assumptions about available estate and
occasional test failures.
fixes: #17453
closes: #17447
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim
index 5189b61..91423eb 100644
--- a/src/testdir/test_highlight.vim
+++ b/src/testdir/test_highlight.vim
@@ -1144,6 +1144,17 @@
" 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([]))