summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-02-24 14:38:51 +0100
committerBram Moolenaar <Bram@vim.org>2018-02-24 14:38:51 +0100
commitb7ea7cb8e430ea096b4c452cdc9c3299819e6d6b (patch)
tree605f285de5f53d3998bd9b3f7a0734bf8181dafe
parent674e482d1346aa1afddab62675f3a7d7a00a4894 (diff)
patch 8.0.1534: C syntax test fails when using gvimv8.0.1534
Problem: C syntax test fails when using gvim Solution: Force running in a terminal. Check that 'background' is correct even when $COLORFGBG is set.
-rw-r--r--src/testdir/screendump.vim3
-rw-r--r--src/testdir/test_syntax.vim8
-rw-r--r--src/version.c2
3 files changed, 12 insertions, 1 deletions
diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim
index 5131b935ae..5ebe60908b 100644
--- a/src/testdir/screendump.vim
+++ b/src/testdir/screendump.vim
@@ -24,7 +24,8 @@ func RunVimInTerminal(arguments, options)
hi Normal ctermfg=0 ctermbg=15
let cmd = GetVimCommandClean()
- let cmd .= ' ' . a:arguments
+ " Add -v to have gvim run in the terminal (if possible)
+ let cmd .= ' -v ' . a:arguments
let buf = term_start(cmd, {'curwin': 1, 'term_rows': 20, 'term_cols': 75})
call assert_equal([20, 75], term_getsize(buf))
diff --git a/src/testdir/test_syntax.vim b/src/testdir/test_syntax.vim
index 554ff1620b..1969152a20 100644
--- a/src/testdir/test_syntax.vim
+++ b/src/testdir/test_syntax.vim
@@ -527,6 +527,8 @@ endfunc
" Check highlighting for a small piece of C code with a screen dump.
func Test_syntax_c()
" Need to be able to run terminal Vim with 256 colors.
+ " On MS-Windows the console only has 16 colors and the GUI can't run in a
+ " terminal.
if !has('terminal') || has('win32')
return
endif
@@ -551,9 +553,15 @@ func Test_syntax_c()
\ ' }',
\ '}',
\ ], 'Xtest.c')
+
+ " This makes the default for 'background' use "dark", check that the
+ " response to t_RB corrects it to "light".
+ let $COLORFGBG = '15;0'
+
let buf = RunVimInTerminal('Xtest.c', {})
call VerifyScreenDump(buf, 'Test_syntax_c_01')
call StopVimInTerminal(buf)
+ let $COLORFGBG = ''
call delete('Xtest.c')
endfun
diff --git a/src/version.c b/src/version.c
index 95e5a72ba1..085e0f9b61 100644
--- a/src/version.c
+++ b/src/version.c
@@ -779,6 +779,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1534,
+/**/
1533,
/**/
1532,