Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbra committed Jun 25, 2023
1 parent b0d598a commit adb2d96
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/testdir/dumps/Test_prop_sign_tab_1.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
| +0#0000e05#a8a8a8255@1>o+0#0000000#ffff4012|n|e| +0&#ffffff0@54
|>@1| +0&#ffff4012@7|t|a|b| +0&#5fd7ff255@46
|>+0&#ffffff0@1| +0&#ffff4012@7|s|p|a|c|e| +0&#5fd7ff255@44
|X+3&#ffffff0|b|u|f@1|e|r| |[|+|]| @30|1|,|1| @11|T|o|p
| +0&&@59
|~+0#4040ff13&| @58
|[+1#0000000&|N|o| |N|a|m|e|]| @32|0|,|0|-|1| @9|A|l@1
|"+0&&|X|b|u|f@1|e|r|"| |[|N|e|w|]| @44
8 changes: 8 additions & 0 deletions src/testdir/dumps/Test_prop_sign_tab_2.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
| +0#0000e05#a8a8a8255@1>o+0#0000000#ffff4012|n|e|¶+0#4040ff13#ffffff0| +0#0000000&@53
|>@1|>+0#0000e05#5fd7ff255|-@6|t+0#0000000#ffff4012|a|b|¶+0#4040ff13#5fd7ff255| +0#0000000&@45
|>+0&#ffffff0@1| +0&#ffff4012@7|s|p|a|c|e|¶+0#4040ff13#5fd7ff255| +0#0000000&@43
|X+3&#ffffff0|b|u|f@1|e|r| |[|+|]| @30|1|,|1| @11|T|o|p
| +0&&@59
|~+0#4040ff13&| @58
|[+1#0000000&|N|o| |N|a|m|e|]| @32|0|,|0|-|1| @9|A|l@1
|:+0&&|s|e|t|l| |l|i|s|t| |l|i|s|t|c|h|a|r|s|=|e|o|l|:|¶|,|t|a|b|:|>|-| @26
25 changes: 25 additions & 0 deletions src/testdir/test_textprop.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3951,5 +3951,30 @@ func Test_error_after_using_negative_id()
call StopVimInTerminal(buf)
endfunc

func Test_text_prop_list_hl_and_sign_highlight()
CheckRunVimInTerminal

let lines =<< trim END
func Test()
split Xbuffer
call setline(1, ['one', "\ttab", ' space', 'three', 'four', 'five'])
call prop_type_add('Prop1', #{highlight: 'Search', override: v:true})
sign define sign1 text=>> linehl=DiffAdd
sign place 10 line=2 name=sign1
sign place 20 line=3 name=sign1
call prop_add(1, 1, #{end_lnum: 4, end_col: 5, type: 'Prop1'})
sign place 30 line=5 name=sign1
endfunc
call Test()
END
call writefile(lines, 'XtextPropSignTab', 'D')
let buf = RunVimInTerminal('-S XtextPropSignTab', #{rows: 8, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_sign_tab_1', {})

call term_sendkeys(buf, ":setl list listchars=eol:¶,tab:>-\<CR>")
call VerifyScreenDump(buf, 'Test_prop_sign_tab_2', {})

call StopVimInTerminal(buf)
endfunc

" vim: shiftwidth=2 sts=2 expandtab

0 comments on commit adb2d96

Please sign in to comment.