diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-12-08 08:00:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-08 08:00:27 +0800 |
commit | 3bb5d2f2192b63e368a4f573f66406eba3ee66b3 (patch) | |
tree | 05ce75681734aae42887dcf1b02c802dab08c731 /test/functional/core/job_spec.lua | |
parent | 5e3c1b976ab4664bde2f546ac15510f4d888a39e (diff) | |
download | rneovim-3bb5d2f2192b63e368a4f573f66406eba3ee66b3.tar.gz rneovim-3bb5d2f2192b63e368a4f573f66406eba3ee66b3.tar.bz2 rneovim-3bb5d2f2192b63e368a4f573f66406eba3ee66b3.zip |
test: use termopen() instead of :terminal more (#26462)
Diffstat (limited to 'test/functional/core/job_spec.lua')
-rw-r--r-- | test/functional/core/job_spec.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua index 038368c387..d2ea0b7441 100644 --- a/test/functional/core/job_spec.lua +++ b/test/functional/core/job_spec.lua @@ -676,7 +676,7 @@ describe('jobs', function() on_stderr = function(chan, data, name) stderr = data end, on_stdout = function(chan, data, name) stdout = data end, } - local j1 = vim.fn.jobstart({ vim.v.progpath, '-es', '-V1',( '+echo "%s="..getenv("%s")'):format(envname, envname), '+qa!' }, opt) + local j1 = vim.fn.jobstart({ vim.v.progpath, '-es', '-V1',('+echo "%s="..getenv("%s")'):format(envname, envname), '+qa!' }, opt) vim.fn.jobwait({ j1 }, 10000) return join({ join(stdout), join(stderr) }) ]], @@ -1162,11 +1162,12 @@ describe("pty process teardown", function() it("does not prevent/delay exit. #4798 #4900", function() skip(is_os('win')) -- Use a nested nvim (in :term) to test without --headless. - feed_command(":terminal '"..helpers.nvim_prog - .."' -u NONE -i NONE --cmd '"..nvim_set.."' " + funcs.termopen({ + helpers.nvim_prog, '-u', 'NONE', '-i', "NONE", '--cmd', nvim_set, -- Use :term again in the _nested_ nvim to get a PTY process. -- Use `sleep` to simulate a long-running child of the PTY. - .."+terminal +'!(sleep 300 &)' +qa") + '+terminal', '+!(sleep 300 &)', '+qa', + }, { env = { VIMRUNTIME = os.getenv('VIMRUNTIME') } }) -- Exiting should terminate all descendants (PTY, its children, ...). screen:expect([[ |