0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.0.1534: C syntax test fails when using gvim

Problem:    C syntax test fails when using gvim
Solution:   Force running in a terminal.  Check that 'background' is correct
            even when $COLORFGBG is set.
This commit is contained in:
Bram Moolenaar
2018-02-24 14:38:51 +01:00
parent 674e482d13
commit b7ea7cb8e4
3 changed files with 12 additions and 1 deletions

View File

@@ -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