commit 95580f31b384fddd162e0e1f6b7ed69b3e483ea1
parent 341d0ec3b31018ebb38d6ecf9b6f4a2319bbfc18
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu, 19 May 2022 10:42:05 +0800
test(mksession_spec): only sleep on Windows (#18637)
Diffstat:
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git 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