mirror of
https://github.com/neovim/neovim.git
synced 2025-12-17 03:45:42 +00:00
test: fix mksession terminal CWD test again (#18615)
This commit is contained in:
@@ -10,6 +10,7 @@ local funcs = helpers.funcs
|
|||||||
local matches = helpers.matches
|
local matches = helpers.matches
|
||||||
local pesc = helpers.pesc
|
local pesc = helpers.pesc
|
||||||
local rmdir = helpers.rmdir
|
local rmdir = helpers.rmdir
|
||||||
|
local sleep = helpers.sleep
|
||||||
|
|
||||||
local file_prefix = 'Xtest-functional-ex_cmds-mksession_spec'
|
local file_prefix = 'Xtest-functional-ex_cmds-mksession_spec'
|
||||||
|
|
||||||
@@ -102,9 +103,11 @@ describe(':mksession', function()
|
|||||||
local session_path = cwd_dir..'/'..session_file
|
local session_path = cwd_dir..'/'..session_file
|
||||||
|
|
||||||
command('cd '..tab_dir)
|
command('cd '..tab_dir)
|
||||||
command('terminal echo $PWD')
|
command('terminal')
|
||||||
command('cd '..cwd_dir)
|
command('cd '..cwd_dir)
|
||||||
command('mksession '..session_path)
|
command('mksession '..session_path)
|
||||||
|
command('bd!')
|
||||||
|
sleep(100) -- Make sure the process exits.
|
||||||
command('qall!')
|
command('qall!')
|
||||||
|
|
||||||
-- Create a new test instance of Nvim.
|
-- Create a new test instance of Nvim.
|
||||||
@@ -113,5 +116,7 @@ describe(':mksession', function()
|
|||||||
|
|
||||||
local expected_cwd = cwd_dir..'/'..tab_dir
|
local expected_cwd = cwd_dir..'/'..tab_dir
|
||||||
matches('^term://'..pesc(expected_cwd)..'//%d+:', funcs.expand('%'))
|
matches('^term://'..pesc(expected_cwd)..'//%d+:', funcs.expand('%'))
|
||||||
|
command('bd!')
|
||||||
|
sleep(100) -- Make sure the process exits.
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user