aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-12-08 08:00:27 +0800
committerGitHub <noreply@github.com>2023-12-08 08:00:27 +0800
commit3bb5d2f2192b63e368a4f573f66406eba3ee66b3 (patch)
tree05ce75681734aae42887dcf1b02c802dab08c731 /test/functional/ex_cmds/swapfile_preserve_recover_spec.lua
parent5e3c1b976ab4664bde2f546ac15510f4d888a39e (diff)
downloadrneovim-3bb5d2f2192b63e368a4f573f66406eba3ee66b3.tar.gz
rneovim-3bb5d2f2192b63e368a4f573f66406eba3ee66b3.tar.bz2
rneovim-3bb5d2f2192b63e368a4f573f66406eba3ee66b3.zip
test: use termopen() instead of :terminal more (#26462)
Diffstat (limited to 'test/functional/ex_cmds/swapfile_preserve_recover_spec.lua')
-rw-r--r--test/functional/ex_cmds/swapfile_preserve_recover_spec.lua16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua b/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua
index 436873b464..c0e592deb8 100644
--- a/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua
+++ b/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua
@@ -115,7 +115,9 @@ describe("preserve and (R)ecover with custom 'directory'", function()
local screen0 = Screen.new()
screen0:attach()
local child_server = new_pipename()
- funcs.termopen({nvim_prog, '-u', 'NONE', '-i', 'NONE', '--listen', child_server})
+ funcs.termopen({ nvim_prog, '-u', 'NONE', '-i', 'NONE', '--listen', child_server }, {
+ env = { VIMRUNTIME = os.getenv('VIMRUNTIME') }
+ })
screen0:expect({any = pesc('[No Name]')}) -- Wait for the child process to start.
local child_session = helpers.connect(child_server)
set_session(child_session)
@@ -452,7 +454,9 @@ describe('quitting swapfile dialog on startup stops TUI properly', function()
it('(Q)uit at first file argument', function()
local chan = funcs.termopen({nvim_prog, '-u', 'NONE', '-i', 'NONE',
'--cmd', init_dir, '--cmd', init_set,
- testfile})
+ testfile}, {
+ env = { VIMRUNTIME = os.getenv('VIMRUNTIME') }
+ })
retry(nil, nil, function()
eq('[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:',
eval("getline('$')->trim(' ', 2)"))
@@ -467,7 +471,9 @@ describe('quitting swapfile dialog on startup stops TUI properly', function()
it('(A)bort at second file argument with -p', function()
local chan = funcs.termopen({nvim_prog, '-u', 'NONE', '-i', 'NONE',
'--cmd', init_dir, '--cmd', init_set,
- '-p', otherfile, testfile})
+ '-p', otherfile, testfile}, {
+ env = { VIMRUNTIME = os.getenv('VIMRUNTIME') }
+ })
retry(nil, nil, function()
eq('[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:',
eval("getline('$')->trim(' ', 2)"))
@@ -487,7 +493,9 @@ describe('quitting swapfile dialog on startup stops TUI properly', function()
third %s /^ \zsthird$/]]):format(testfile, testfile, testfile))
local chan = funcs.termopen({nvim_prog, '-u', 'NONE', '-i', 'NONE',
'--cmd', init_dir, '--cmd', init_set,
- '--cmd', 'set tags='..otherfile, '-tsecond'})
+ '--cmd', 'set tags='..otherfile, '-tsecond'}, {
+ env = { VIMRUNTIME = os.getenv('VIMRUNTIME') }
+ })
retry(nil, nil, function()
eq('[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:',
eval("getline('$')->trim(' ', 2)"))