aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-02-14 08:12:32 +0800
committerGitHub <noreply@github.com>2023-02-14 08:12:32 +0800
commitfc9ece617bbf5fbdc74eed33c63641c550b4b314 (patch)
treeec1b2c9998953953f11630fa8b012f7ca6b54312 /test
parentb518aceaa8f738e581e58aacae93514699b5ff8e (diff)
parent820430dc0bb84011edae801262e64a10be7ebb9d (diff)
downloadrneovim-fc9ece617bbf5fbdc74eed33c63641c550b4b314.tar.gz
rneovim-fc9ece617bbf5fbdc74eed33c63641c550b4b314.tar.bz2
rneovim-fc9ece617bbf5fbdc74eed33c63641c550b4b314.zip
Merge pull request #22244 from zeertzjq/tui-eof
fix(tui): exit on input eof
Diffstat (limited to 'test')
-rw-r--r--test/functional/terminal/tui_spec.lua32
1 files changed, 18 insertions, 14 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index 7294969ac8..4e62354ed8 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -2365,18 +2365,18 @@ describe("TUI as a client", function()
set_session(client_super)
local screen_client = thelpers.screen_setup(0,
- string.format([=[["%s", "-u", "NONE", "-i", "NONE", "--server", "%s", "--remote-ui"]]=],
+ string.format([=[["%s", "--server", "%s", "--remote-ui"]]=],
nvim_prog, server_pipe))
- screen_client:expect{grid=[[
- Hello, Worl{1:d} |
- {4:~ }|
- {4:~ }|
- {4:~ }|
- {5:[No Name] [+] }|
- |
- {3:-- TERMINAL --} |
- ]]}
+ screen_client:expect{grid=[[
+ Hello, Worl{1:d} |
+ {4:~ }|
+ {4:~ }|
+ {4:~ }|
+ {5:[No Name] [+] }|
+ |
+ {3:-- TERMINAL --} |
+ ]]}
feed_data(":q!\n")
@@ -2394,7 +2394,7 @@ describe("TUI as a client", function()
set_session(client_super)
local screen = thelpers.screen_setup(0,
- string.format([=[["%s", "-u", "NONE", "-i", "NONE", "--server", "%s", "--remote-ui"]]=],
+ string.format([=[["%s", "--server", "%s", "--remote-ui"]]=],
nvim_prog, server_pipe))
screen:expect{grid=[[
@@ -2412,15 +2412,19 @@ describe("TUI as a client", function()
exec_lua([[vim.loop.kill(vim.fn.jobpid(vim.bo.channel), 'sigterm')]])
screen:expect({any = '%[Process exited 1%]'})
+ eq(0, meths.get_vvar('shell_error'))
+ -- exits on input eof #22244
+ funcs.system({nvim_prog, '--server', server_pipe, '--remote-ui'})
+ eq(1, meths.get_vvar('shell_error'))
+
client_super:close()
server:close()
end)
-
it("throws error when no server exists", function()
clear()
local screen = thelpers.screen_setup(0,
- string.format([=[["%s", "-u", "NONE", "-i", "NONE", "--server", "127.0.0.1:2436546", "--remote-ui"]]=],
+ string.format([=[["%s", "--server", "127.0.0.1:2436546", "--remote-ui"]]=],
nvim_prog), 60)
screen:expect([[
@@ -2467,7 +2471,7 @@ describe("TUI as a client", function()
set_session(client_super)
local screen_client = thelpers.screen_setup(0,
- string.format([=[["%s", "-u", "NONE", "-i", "NONE", "--server", "%s", "--remote-ui"]]=],
+ string.format([=[["%s", "--server", "%s", "--remote-ui"]]=],
nvim_prog, server_pipe))
screen_client:expect{grid=[[