diff options
Diffstat (limited to 'test/functional/ui/searchhl_spec.lua')
-rw-r--r-- | test/functional/ui/searchhl_spec.lua | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua index 9f273e8dc9..168080a092 100644 --- a/test/functional/ui/searchhl_spec.lua +++ b/test/functional/ui/searchhl_spec.lua @@ -4,6 +4,8 @@ local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert local feed_command = helpers.feed_command local eq = helpers.eq local eval = helpers.eval +local iswin = helpers.iswin +local sleep = helpers.sleep describe('search highlighting', function() local screen @@ -91,6 +93,38 @@ describe('search highlighting', function() ]]) end) + it('is preserved during :terminal activity', function() + if iswin() then + feed([[:terminal for /L \%I in (1,1,5000) do @(echo xxx & echo xxx & echo xxx)<cr>]]) + else + feed([[:terminal for i in $(seq 1 5000); do printf 'xxx\nxxx\nxxx\n'; done<cr>]]) + end + + feed(':file term<CR>') + feed(':vnew<CR>') + insert([[ + foo bar baz + bar baz foo + bar foo baz + ]]) + feed('/foo') + sleep(50) -- Allow some terminal activity. + screen:expect([[ + {3:foo} bar baz {3:│}xxx | + bar baz {2:foo} {3:│}xxx | + bar {2:foo} baz {3:│}xxx | + {3:│}xxx | + {1:~ }{3:│}xxx | + {5:[No Name] [+] }{3:term }| + /foo^ | + ]], { [1] = {bold = true, foreground = Screen.colors.Blue1}, + [2] = {background = Screen.colors.Yellow}, + [3] = {reverse = true}, + [4] = {foreground = Screen.colors.Red}, + [5] = {bold = true, reverse = true}, + }) + end) + it('works with incsearch', function() feed_command('set hlsearch') feed_command('set incsearch') |