aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/terminal')
-rw-r--r--test/functional/terminal/tui_spec.lua30
-rw-r--r--test/functional/terminal/window_split_tab_spec.lua9
2 files changed, 23 insertions, 16 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index a0adb45630..9d0eb5e40e 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -839,8 +839,7 @@ describe('TUI background color', function()
it("triggers OptionSet event on terminal-response", function()
feed_data('\027:autocmd OptionSet background echo "did OptionSet, yay!"\n')
- -- The child Nvim is running asynchronously; wait for it to register the
- -- OptionSet handler.
+ -- Wait for the child Nvim to register the OptionSet handler.
feed_data('\027:autocmd OptionSet\n')
screen:expect({any='--- Autocommands ---'})
@@ -860,16 +859,23 @@ describe('TUI background color', function()
local function assert_bg(color, bg)
it('handles '..color..' as '..bg, function()
- feed_data('\027]11;rgb:'..color..'\007:echo &background\n')
- screen:expect(string.format([[
- {1: } |
- {4:~ }|
- {4:~ }|
- {4:~ }|
- {5:[No Name] 0,0-1 All}|
- %-5s |
- {3:-- TERMINAL --} |
- ]], bg))
+ feed_data('\027]11;rgb:'..color..'\007')
+ -- Retry until the terminal response is handled.
+ retry(100, nil, function()
+ feed_data(':echo &background\n')
+ screen:expect({
+ timeout=40,
+ grid=string.format([[
+ {1: } |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] 0,0-1 All}|
+ %-5s |
+ {3:-- TERMINAL --} |
+ ]], bg)
+ })
+ end)
end)
end
diff --git a/test/functional/terminal/window_split_tab_spec.lua b/test/functional/terminal/window_split_tab_spec.lua
index f3d0b45d09..c0ce656bb1 100644
--- a/test/functional/terminal/window_split_tab_spec.lua
+++ b/test/functional/terminal/window_split_tab_spec.lua
@@ -39,10 +39,11 @@ describe(':terminal', function()
it('does not change size on WinEnter', function()
if helpers.pending_win32(pending) then return end
feed('<c-\\><c-n>')
+ feed('k')
feed_command('2split')
screen:expect([[
- tty ready |
- ^rows: 5, cols: 50 |
+ ^tty ready |
+ rows: 5, cols: 50 |
========== |
tty ready |
rows: 5, cols: 50 |
@@ -57,8 +58,8 @@ describe(':terminal', function()
tty ready |
rows: 5, cols: 50 |
========== |
- tty ready |
- ^rows: 5, cols: 50 |
+ ^tty ready |
+ rows: 5, cols: 50 |
{2: } |
|
|