diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-13 13:30:55 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-11-13 13:50:43 +0800 |
commit | 30d09d8258129833cceba5d936eb7ba29d371536 (patch) | |
tree | ca581ea606914e15be5709b6dee42b276522f14b | |
parent | bcac7674f7b51f73206b8c79b779964650a2f53f (diff) | |
download | rneovim-30d09d8258129833cceba5d936eb7ba29d371536.tar.gz rneovim-30d09d8258129833cceba5d936eb7ba29d371536.tar.bz2 rneovim-30d09d8258129833cceba5d936eb7ba29d371536.zip |
vim-patch:8.1.2276: MS-Windows: session test leaves files behind
Problem: MS-Windows: session test leaves files behind.
Solution: Wipe out buffers before deleting the directory. (closes vim/vim#5187)
https://github.com/vim/vim/commit/5bf46e978619ff602a7c63dd98e19de8248236b3
Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r-- | test/old/testdir/test_mksession.vim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/old/testdir/test_mksession.vim b/test/old/testdir/test_mksession.vim index 9d1e864686..47465c46f9 100644 --- a/test/old/testdir/test_mksession.vim +++ b/test/old/testdir/test_mksession.vim @@ -294,8 +294,8 @@ func Test_mksession_tcd_multiple_tabs() call assert_equal('Xtabdir3', fnamemodify(getcwd(-1, 3), ':t')) call assert_equal('Xtabdir3', fnamemodify(getcwd(1, 3), ':t')) call assert_equal('Xwindir3', fnamemodify(getcwd(2, 3), ':t')) - only | tabonly - exe 'cd ' . save_cwd + %bwipe + call chdir(save_cwd) call delete("Xtopdir", "rf") endfunc @@ -781,6 +781,7 @@ endfunc " Test for changing directory to the session file directory func Test_mksession_sesdir() + let save_cwd = getcwd() call mkdir('Xproj') mksession! Xproj/Xtest_mks1.out set sessionoptions-=curdir @@ -791,7 +792,8 @@ func Test_mksession_sesdir() call assert_equal('testdir', fnamemodify(getcwd(), ':t')) source Xproj/Xtest_mks2.out call assert_equal('Xproj', fnamemodify(getcwd(), ':t')) - cd .. + call chdir(save_cwd) + %bwipe set sessionoptions& call delete('Xproj', 'rf') |