aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-21 14:55:13 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-08-21 15:31:21 +0800
commite8df2a012b3d54c3c39bdc8abbfdcdec6a402cf8 (patch)
tree9c483a8e0aa4f63fbad2995423d58261f828c554
parent6f5ff5818abcfff4fce74f3972debc72704f8d49 (diff)
downloadrneovim-e8df2a012b3d54c3c39bdc8abbfdcdec6a402cf8.tar.gz
rneovim-e8df2a012b3d54c3c39bdc8abbfdcdec6a402cf8.tar.bz2
rneovim-e8df2a012b3d54c3c39bdc8abbfdcdec6a402cf8.zip
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) https://github.com/vim/vim/commit/705724e430abd10ffdd5f1a2bb5a8f9223ff5cdd Just copy the two 'wincolor' test functions from Vim. Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--test/old/testdir/test_highlight.vim51
1 files changed, 51 insertions, 0 deletions
diff --git a/test/old/testdir/test_highlight.vim b/test/old/testdir/test_highlight.vim
index 14c208521b..4026302a5b 100644
--- a/test/old/testdir/test_highlight.vim
+++ b/test/old/testdir/test_highlight.vim
@@ -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' includingnbsps, 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