aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/functional/terminal/tui_spec.lua48
1 files changed, 30 insertions, 18 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index b3d2625d78..1807001842 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -13,6 +13,7 @@ local feed_command = helpers.feed_command
local feed_data = thelpers.feed_data
local clear = helpers.clear
local command = helpers.command
+local exec = helpers.exec
local testprg = helpers.testprg
local retry = helpers.retry
local nvim_prog = helpers.nvim_prog
@@ -90,24 +91,6 @@ describe('TUI', function()
assert_alive()
end)
- it('resize at startup', function()
- -- Issues: #17285 #15044 #11330
- screen:try_resize(50, 10)
- feed_command([[call termopen([v:progpath, '--clean', '--cmd', 'let start = reltime() | while v:true | if reltimefloat(reltime(start)) > 2 | break | endif | endwhile']) | sleep 500m | vs new]])
- screen:expect([[
- {1: } │ |
- {4:~ }│{4:~ }|
- {4:~ }│{4:~ }|
- {4:~ }│{4:~ }|
- {4:~ }│{4:~ }|
- {4:~ }│{5:[No Name] 0,0-1 All}|
- {4:~ }│ |
- {5:new }{MATCH:<.*[/\]nvim }|
- |
- {3:-- TERMINAL --} |
- ]])
- end)
-
it('accepts resize while pager is active', function()
child_session:request("nvim_command", [[
set more
@@ -1437,6 +1420,35 @@ describe('TUI', function()
os.remove('testF')
end)
+ it('resize at startup #17285 #15044 #11330', function()
+ local screen = Screen.new(50, 10)
+ screen:set_default_attr_ids({
+ [1] = {reverse = true},
+ [2] = {bold = true, foreground = Screen.colors.Blue},
+ [3] = {bold = true},
+ [4] = {foreground = tonumber('0x4040ff'), fg_indexed = true},
+ [5] = {bold = true, reverse = true},
+ })
+ screen:attach()
+ exec([[
+ call termopen([v:progpath, '--clean', '--cmd', 'let start = reltime() | while v:true | if reltimefloat(reltime(start)) > 2 | break | endif | endwhile'])
+ sleep 500m
+ vs new
+ ]])
+ screen:expect([[
+ ^ │ |
+ {2:~ }│{4:~ }|
+ {2:~ }│{4:~ }|
+ {2:~ }│{4:~ }|
+ {2:~ }│{4:~ }|
+ {2:~ }│{4:~ }|
+ {2:~ }│{5:[No Name] 0,0-1 All}|
+ {2:~ }│ |
+ {5:new }{MATCH:<.*[/\]nvim }|
+ |
+ ]])
+ end)
+
it('with non-tty (pipe) stdout/stderr', function()
local screen = thelpers.screen_setup(0, '"'..nvim_prog
..' -u NONE -i NONE --cmd \'set noswapfile noshowcmd noruler\' --cmd \'normal iabc\' > /dev/null 2>&1 && cat testF && rm testF"')