aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
authorJaskaran Singh <jaskaransingh7654321@gmail.com>2019-09-14 03:16:19 +0530
committerJustin M. Keyes <justinkz@gmail.com>2019-09-13 14:46:19 -0700
commit3afb397407af3c94fc82d694186e8d451e625237 (patch)
tree6178036f4d81fd706eff8926f96876eb195faeb4 /test/functional/ui
parent35341b34b835eeb184ac9f0e2078ce31f6612fd7 (diff)
downloadrneovim-3afb397407af3c94fc82d694186e8d451e625237.tar.gz
rneovim-3afb397407af3c94fc82d694186e8d451e625237.tar.bz2
rneovim-3afb397407af3c94fc82d694186e8d451e625237.zip
syntax, TUI: support "strikethrough"
fix #3436 Includes: vim-patch:8.0.1038: strike-through text not supported
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/highlight_spec.lua26
-rw-r--r--test/functional/ui/screen.lua3
2 files changed, 28 insertions, 1 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index 47b2d23c9b..f40f658275 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -412,6 +412,32 @@ describe('highlight', function()
]])
end)
+ it('strikethrough', function()
+ screen:detach()
+ screen = Screen.new(25,6)
+ screen:attach()
+ feed_command('syntax on')
+ feed_command('syn keyword TmpKeyword foo')
+ feed_command('hi! Awesome cterm=strikethrough gui=strikethrough')
+ feed_command('hi link TmpKeyword Awesome')
+ insert([[
+ foo
+ foo bar
+ foobarfoobar
+ ]])
+ screen:expect([[
+ {1:foo} |
+ {1:foo} bar |
+ foobarfoobar |
+ ^ |
+ {2:~ }|
+ |
+ ]],{
+ [1] = {strikethrough = true},
+ [2] = {bold = true, foreground = Screen.colors.Blue1},
+ })
+ end)
+
it('guisp (special/undercurl)', function()
feed_command('syntax on')
feed_command('syn keyword TmpKeyword neovim')
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
index 12abfb2ad9..06a2ac3ca2 100644
--- a/test/functional/ui/screen.lua
+++ b/test/functional/ui/screen.lua
@@ -1509,7 +1509,8 @@ function Screen:_equal_attrs(a, b)
a.underline == b.underline and a.undercurl == b.undercurl and
a.italic == b.italic and a.reverse == b.reverse and
a.foreground == b.foreground and a.background == b.background and
- a.special == b.special and a.blend == b.blend
+ a.special == b.special and a.blend == b.blend and
+ a.strikethrough == b.strikethrough
end
function Screen:_equal_info(a, b)