diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-22 12:59:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-22 12:59:34 +0800 |
commit | bb7853a62dc32baafa7416b94c97f985287f39e2 (patch) | |
tree | e8b1ccb2073d239bed7840d6c070bc6c6c8a2d7a | |
parent | 8af3d641daf03610c824ca4e0dffa07db297cb5b (diff) | |
download | rneovim-bb7853a62dc32baafa7416b94c97f985287f39e2.tar.gz rneovim-bb7853a62dc32baafa7416b94c97f985287f39e2.tar.bz2 rneovim-bb7853a62dc32baafa7416b94c97f985287f39e2.zip |
test(mksession_spec): use %bwipeout! instead of qall! to close terminal (#19465)
Avoid expect_exit, session will be closed when a new one is spawned.
-rw-r--r-- | test/functional/ex_cmds/mksession_spec.lua | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/functional/ex_cmds/mksession_spec.lua b/test/functional/ex_cmds/mksession_spec.lua index 1553de4432..405813c12b 100644 --- a/test/functional/ex_cmds/mksession_spec.lua +++ b/test/functional/ex_cmds/mksession_spec.lua @@ -14,7 +14,6 @@ local pesc = helpers.pesc local rmdir = helpers.rmdir local sleep = helpers.sleep local meths = helpers.meths -local expect_exit = helpers.expect_exit local file_prefix = 'Xtest-functional-ex_cmds-mksession_spec' @@ -43,9 +42,9 @@ describe(':mksession', function() command('terminal') command('split') command('mksession '..session_file) + command('%bwipeout!') -- Create a new test instance of Nvim. - expect_exit(command, 'qall!') clear() -- Restore session. command('source '..session_file) @@ -110,11 +109,10 @@ describe(':mksession', function() command('terminal') command('cd '..cwd_dir) command('mksession '..session_path) - command('bdelete!') + command('%bwipeout!') if iswin() then sleep(100) -- Make sure all child processes have exited. end - expect_exit(command, 'qall!') -- Create a new test instance of Nvim. clear() @@ -122,7 +120,7 @@ describe(':mksession', function() local expected_cwd = cwd_dir..'/'..tab_dir matches('^term://'..pesc(expected_cwd)..'//%d+:', funcs.expand('%')) - command('bdelete!') + command('%bwipeout!') if iswin() then sleep(100) -- Make sure all child processes have exited. end @@ -157,7 +155,7 @@ describe(':mksession', function() command('cd '..cwd_dir) command('mksession '..session_path) - expect_exit(command, 'qall!') + command('%bwipeout!') -- Create a new test instance of Nvim. clear() |