diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-03-23 20:01:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-23 20:01:21 +0100 |
commit | 3d9c028a4ce1557af7f7269968db5dd0c480f270 (patch) | |
tree | fa08e1ee69250026610790531336a9dbef0a4aaf /test/functional/terminal | |
parent | 2c1e8f7e96926f70151d737ea32f1e6ff3589263 (diff) | |
parent | 0c59771e314d6faaad69676985cd2a11c157ee37 (diff) | |
download | rneovim-3d9c028a4ce1557af7f7269968db5dd0c480f270.tar.gz rneovim-3d9c028a4ce1557af7f7269968db5dd0c480f270.tar.bz2 rneovim-3d9c028a4ce1557af7f7269968db5dd0c480f270.zip |
Merge pull request #27980 from bfredl/noignore
refactor(tests): all screen tests should use highlights
Diffstat (limited to 'test/functional/terminal')
-rw-r--r-- | test/functional/terminal/channel_spec.lua | 1 | ||||
-rw-r--r-- | test/functional/terminal/ex_terminal_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/terminal/scrollback_spec.lua | 13 |
3 files changed, 11 insertions, 5 deletions
diff --git a/test/functional/terminal/channel_spec.lua b/test/functional/terminal/channel_spec.lua index 9615534c87..fd98c5d8f6 100644 --- a/test/functional/terminal/channel_spec.lua +++ b/test/functional/terminal/channel_spec.lua @@ -121,6 +121,7 @@ it('chansend sends lines to terminal channel in proper order', function() clear({ args = { '--cmd', 'set laststatus=2' } }) local screen = Screen.new(100, 20) screen:attach() + screen._default_attr_ids = nil local shells = is_os('win') and { 'cmd.exe', 'pwsh.exe -nop', 'powershell.exe -nop' } or { 'sh' } for _, sh in ipairs(shells) do command([[let id = termopen(']] .. sh .. [[')]]) diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua index 92d37fc04a..6f9db63b3a 100644 --- a/test/functional/terminal/ex_terminal_spec.lua +++ b/test/functional/terminal/ex_terminal_spec.lua @@ -21,6 +21,7 @@ describe(':terminal', function() clear() screen = Screen.new(50, 4) screen:attach({ rgb = false }) + screen._default_attr_ids = nil end) it('does not interrupt Press-ENTER prompt #2748', function() @@ -168,6 +169,7 @@ local function test_terminal_with_fake_shell(backslash) clear() screen = Screen.new(50, 4) screen:attach({ rgb = false }) + screen._default_attr_ids = nil api.nvim_set_option_value('shell', shell_path, {}) api.nvim_set_option_value('shellcmdflag', 'EXE', {}) api.nvim_set_option_value('shellxquote', '', {}) -- win: avoid extra quotes diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua index 858e23984d..b8890ab581 100644 --- a/test/functional/terminal/scrollback_spec.lua +++ b/test/functional/terminal/scrollback_spec.lua @@ -361,16 +361,19 @@ describe(':terminal prints more lines than the screen height and exits', functio line8 | line9 | | - [Process exited 0] | - -- TERMINAL -- | + [Process exited 0]{2: } | + {5:-- TERMINAL --} | ]]) feed('<cr>') -- closes the buffer correctly after pressing a key - screen:expect([[ + screen:expect { + grid = [[ ^ | - ~ |*5 + {1:~ }|*5 | - ]]) + ]], + attr_ids = { [1] = { foreground = 12 } }, + } end) end) |