mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
vim-patch:8.2.0186: a couple of tests may fail when features are missing
Problem: A couple of tests may fail when features are missing.
Solution: Check for features. (Dominique Pelle, closes vim/vim#5561)
705724e430
Just copy the two 'wincolor' test functions from Vim.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
6f5ff5818a
commit
e8df2a012b
@ -593,6 +593,57 @@ func Test_cursorline_with_visualmode()
|
||||
call delete('Xtest_cursorline_with_visualmode')
|
||||
endfunc
|
||||
|
||||
func Test_wincolor()
|
||||
CheckScreendump
|
||||
|
||||
let lines =<< trim END
|
||||
set cursorline cursorcolumn rnu
|
||||
call setline(1, ["","1111111111","22222222222","3 here 3","","the cat is out of the bag"])
|
||||
set wincolor=Pmenu
|
||||
hi CatLine guifg=green ctermfg=green
|
||||
hi Reverse gui=reverse cterm=reverse
|
||||
syn match CatLine /^the.*/
|
||||
call prop_type_add("foo", {"highlight": "Reverse", "combine": 1})
|
||||
call prop_add(6, 12, {"type": "foo", "end_col": 15})
|
||||
/here
|
||||
END
|
||||
call writefile(lines, 'Xtest_wincolor')
|
||||
let buf = RunVimInTerminal('-S Xtest_wincolor', {'rows': 8})
|
||||
call term_wait(buf)
|
||||
call term_sendkeys(buf, "2G5lvj")
|
||||
call term_wait(buf)
|
||||
|
||||
call VerifyScreenDump(buf, 'Test_wincolor_01', {})
|
||||
|
||||
" clean up
|
||||
call term_sendkeys(buf, "\<Esc>")
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('Xtest_wincolor')
|
||||
endfunc
|
||||
|
||||
func Test_wincolor_listchars()
|
||||
CheckScreendump
|
||||
CheckFeature conceal
|
||||
|
||||
let lines =<< trim END
|
||||
call setline(1, ["one","\t\tsome random text enough long to show 'extends' and 'precedes' includingnbsps, preceding tabs and trailing spaces ","three"])
|
||||
set wincolor=Todo
|
||||
set nowrap cole=1 cocu+=n
|
||||
set list lcs=eol:$,tab:>-,space:.,trail:_,extends:>,precedes:<,conceal:*,nbsp:#
|
||||
call matchadd('Conceal', 'text')
|
||||
normal 2G5zl
|
||||
END
|
||||
call writefile(lines, 'Xtest_wincolorlcs')
|
||||
let buf = RunVimInTerminal('-S Xtest_wincolorlcs', {'rows': 8})
|
||||
|
||||
call VerifyScreenDump(buf, 'Test_wincolor_lcs', {})
|
||||
|
||||
" clean up
|
||||
call term_sendkeys(buf, "\<Esc>")
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('Xtest_wincolorlcs')
|
||||
endfunc
|
||||
|
||||
func Test_cursorcolumn_insert_on_tab()
|
||||
CheckScreendump
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user