aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-19 10:42:05 +0800
committerGitHub <noreply@github.com>2022-05-19 10:42:05 +0800
commit95580f31b384fddd162e0e1f6b7ed69b3e483ea1 (patch)
treedfbc18e04dad8e1ea67da1fe03ba1cbcdff6e05e
parent341d0ec3b31018ebb38d6ecf9b6f4a2319bbfc18 (diff)
downloadrneovim-95580f31b384fddd162e0e1f6b7ed69b3e483ea1.tar.gz
rneovim-95580f31b384fddd162e0e1f6b7ed69b3e483ea1.tar.bz2
rneovim-95580f31b384fddd162e0e1f6b7ed69b3e483ea1.zip
test(mksession_spec): only sleep on Windows (#18637)
-rw-r--r--test/functional/ex_cmds/mksession_spec.lua15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/functional/ex_cmds/mksession_spec.lua b/test/functional/ex_cmds/mksession_spec.lua
index cca6b45928..c1b4777d16 100644
--- a/test/functional/ex_cmds/mksession_spec.lua
+++ b/test/functional/ex_cmds/mksession_spec.lua
@@ -5,6 +5,7 @@ local Screen = require('test.functional.ui.screen')
local clear = helpers.clear
local command = helpers.command
local get_pathsep = helpers.get_pathsep
+local iswin = helpers.iswin
local eq = helpers.eq
local neq = helpers.neq
local funcs = helpers.funcs
@@ -107,8 +108,10 @@ describe(':mksession', function()
command('terminal')
command('cd '..cwd_dir)
command('mksession '..session_path)
- command('bd!')
- sleep(100) -- Make sure the process exits.
+ command('bdelete!')
+ if iswin() then
+ sleep(100) -- Make sure all child processes have exited.
+ end
command('qall!')
-- Create a new test instance of Nvim.
@@ -117,12 +120,14 @@ describe(':mksession', function()
local expected_cwd = cwd_dir..'/'..tab_dir
matches('^term://'..pesc(expected_cwd)..'//%d+:', funcs.expand('%'))
- command('bd!')
- sleep(100) -- Make sure the process exits.
+ command('bdelete!')
+ if iswin() then
+ sleep(100) -- Make sure all child processes have exited.
+ end
end)
it('restores CWD for :terminal buffer at root directory #16988', function()
- if helpers.iswin() then
+ if iswin() then
pending('N/A for Windows')
return
end