diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-10-14 13:53:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-14 13:53:52 +0800 |
commit | ce0f80835a5f6febd64f4ce5cf245d476ebaecfd (patch) | |
tree | b29e05f172705217ef4cadd525304993614332cd | |
parent | bf70a33f5e7de0218704126c149db24542e39766 (diff) | |
download | rneovim-ce0f80835a5f6febd64f4ce5cf245d476ebaecfd.tar.gz rneovim-ce0f80835a5f6febd64f4ce5cf245d476ebaecfd.tar.bz2 rneovim-ce0f80835a5f6febd64f4ce5cf245d476ebaecfd.zip |
test(ui/searchhl_spec): match more in :terminal test (#25631)
-rw-r--r-- | test/functional/ui/searchhl_spec.lua | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua index eb7a2574f3..dc7ef666bd 100644 --- a/test/functional/ui/searchhl_spec.lua +++ b/test/functional/ui/searchhl_spec.lua @@ -19,7 +19,8 @@ describe('search highlighting', function() [1] = {bold=true, foreground=Screen.colors.Blue}, [2] = {background = Screen.colors.Yellow}, -- Search [3] = {reverse = true}, - [4] = {foreground = Screen.colors.Red}, -- Message + [4] = {foreground = Screen.colors.Red}, -- WarningMsg + [5] = {bold = true, reverse = true}, -- StatusLine [6] = {foreground = Screen.colors.Blue4, background = Screen.colors.LightGrey}, -- Folded }) end) @@ -326,19 +327,33 @@ describe('search highlighting', function() it('is preserved during :terminal activity', function() feed((':terminal "%s" REP 5000 foo<cr>'):format(testprg('shell-test'))) - feed(':file term<CR>') + screen:expect([[ + ^0: foo | + 1: foo | + 2: foo | + 3: foo | + 4: foo | + 5: foo | + :file term | + ]]) + feed('G') -- Follow :terminal output. feed(':vnew<CR>') insert([[ foo bar baz bar baz foo - bar foo baz - ]]) + bar foo baz]]) feed('/foo') - helpers.poke_eventloop() - screen:sleep(100) - screen:expect_unchanged() + screen:expect([[ + {3:foo} bar baz │{MATCH:%d+}: {2:foo}{MATCH:%s+}| + bar baz {2:foo} │{MATCH:%d+}: {2:foo}{MATCH:%s+}| + bar {2:foo} baz │{MATCH:%d+}: {2:foo}{MATCH:%s+}| + {1:~ }│{MATCH:.*}| + {1:~ }│{MATCH:.*}| + {5:[No Name] [+] }{3:term }| + /foo^ | + ]]) end) it('works with incsearch', function() |