aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/searchhl_spec.lua27
1 files changed, 24 insertions, 3 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua
index 84dc3c59bb..56ff8a4101 100644
--- a/test/functional/ui/searchhl_spec.lua
+++ b/test/functional/ui/searchhl_spec.lua
@@ -163,15 +163,25 @@ describe('search highlighting', function()
end)
it('works for multiline match', function()
- command([[call setline(1, ['one', 'foo', 'bar', 'baz', 'foo', 'bar'])]])
+ command([[call setline(1, ['one', 'foo', 'bar', 'baz', 'foo the foo and foo', 'bar'])]])
feed('gg/foo<CR>')
screen:expect([[
one |
{2:^foo} |
bar |
baz |
+ {1:foo} the {1:foo} and {1:foo} |
+ bar |
+ /foo |
+ ]])
+ feed('n')
+ screen:expect([[
+ one |
{1:foo} |
bar |
+ baz |
+ {2:^foo} the {1:foo} and {1:foo} |
+ bar |
/foo |
]])
feed('n')
@@ -180,11 +190,22 @@ describe('search highlighting', function()
{1:foo} |
bar |
baz |
- {2:^foo} |
+ {1:foo} the {2:^foo} and {1:foo} |
+ bar |
+ /foo |
+ ]])
+ feed('n')
+ screen:expect([[
+ one |
+ {1:foo} |
+ bar |
+ baz |
+ {1:foo} the {1:foo} and {2:^foo} |
bar |
/foo |
]])
- feed('?<CR>')
+ command([[call setline(5, 'foo')]])
+ feed('0?<CR>')
screen:expect([[
one |
{2:^foo} |