mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -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:
@@ -24,7 +24,8 @@ func RunVimInTerminal(arguments, options)
|
|||||||
hi Normal ctermfg=0 ctermbg=15
|
hi Normal ctermfg=0 ctermbg=15
|
||||||
|
|
||||||
let cmd = GetVimCommandClean()
|
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})
|
let buf = term_start(cmd, {'curwin': 1, 'term_rows': 20, 'term_cols': 75})
|
||||||
call assert_equal([20, 75], term_getsize(buf))
|
call assert_equal([20, 75], term_getsize(buf))
|
||||||
|
|
||||||
|
@@ -527,6 +527,8 @@ endfunc
|
|||||||
" Check highlighting for a small piece of C code with a screen dump.
|
" Check highlighting for a small piece of C code with a screen dump.
|
||||||
func Test_syntax_c()
|
func Test_syntax_c()
|
||||||
" Need to be able to run terminal Vim with 256 colors.
|
" 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')
|
if !has('terminal') || has('win32')
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
@@ -551,9 +553,15 @@ func Test_syntax_c()
|
|||||||
\ ' }',
|
\ ' }',
|
||||||
\ '}',
|
\ '}',
|
||||||
\ ], 'Xtest.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', {})
|
let buf = RunVimInTerminal('Xtest.c', {})
|
||||||
call VerifyScreenDump(buf, 'Test_syntax_c_01')
|
call VerifyScreenDump(buf, 'Test_syntax_c_01')
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
|
|
||||||
|
let $COLORFGBG = ''
|
||||||
call delete('Xtest.c')
|
call delete('Xtest.c')
|
||||||
endfun
|
endfun
|
||||||
|
@@ -778,6 +778,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1534,
|
||||||
/**/
|
/**/
|
||||||
1533,
|
1533,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user