comparison src/testdir/test_mksession.vim @ 18564:c14f5d3a205d v8.1.2276

patch 8.1.2276: MS-Windows: session test leaves files behind Commit: https://github.com/vim/vim/commit/5bf46e978619ff602a7c63dd98e19de8248236b3 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 9 18:06:04 2019 +0100 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 https://github.com/vim/vim/issues/5187)
author Bram Moolenaar <Bram@vim.org>
date Sat, 09 Nov 2019 18:15:03 +0100
parents ecbe15ce5918
children 068337e86133
comparison
equal deleted inserted replaced
18563:be63c60a2345 18564:c14f5d3a205d
274 call assert_equal('Xtabdir2', fnamemodify(getcwd(1, 2), ':t')) 274 call assert_equal('Xtabdir2', fnamemodify(getcwd(1, 2), ':t'))
275 call assert_equal('Xwindir2', fnamemodify(getcwd(2, 2), ':t')) 275 call assert_equal('Xwindir2', fnamemodify(getcwd(2, 2), ':t'))
276 call assert_equal('Xtabdir3', fnamemodify(getcwd(-1, 3), ':t')) 276 call assert_equal('Xtabdir3', fnamemodify(getcwd(-1, 3), ':t'))
277 call assert_equal('Xtabdir3', fnamemodify(getcwd(1, 3), ':t')) 277 call assert_equal('Xtabdir3', fnamemodify(getcwd(1, 3), ':t'))
278 call assert_equal('Xwindir3', fnamemodify(getcwd(2, 3), ':t')) 278 call assert_equal('Xwindir3', fnamemodify(getcwd(2, 3), ':t'))
279 only | tabonly 279 %bwipe
280 exe 'cd ' . save_cwd 280 call chdir(save_cwd)
281 call delete("Xtopdir", "rf") 281 call delete("Xtopdir", "rf")
282 endfunc 282 endfunc
283 283
284 func Test_mksession_blank_tabs() 284 func Test_mksession_blank_tabs()
285 tabnew 285 tabnew
621 set sessionoptions& 621 set sessionoptions&
622 endfunc 622 endfunc
623 623
624 " Test for changing directory to the session file directory 624 " Test for changing directory to the session file directory
625 func Test_mksession_sesdir() 625 func Test_mksession_sesdir()
626 let save_cwd = getcwd()
626 call mkdir('Xproj') 627 call mkdir('Xproj')
627 mksession! Xproj/Xtest_mks1.out 628 mksession! Xproj/Xtest_mks1.out
628 set sessionoptions-=curdir 629 set sessionoptions-=curdir
629 set sessionoptions+=sesdir 630 set sessionoptions+=sesdir
630 mksession! Xproj/Xtest_mks2.out 631 mksession! Xproj/Xtest_mks2.out
631 632
632 source Xproj/Xtest_mks1.out 633 source Xproj/Xtest_mks1.out
633 call assert_equal('testdir', fnamemodify(getcwd(), ':t')) 634 call assert_equal('testdir', fnamemodify(getcwd(), ':t'))
634 source Xproj/Xtest_mks2.out 635 source Xproj/Xtest_mks2.out
635 call assert_equal('Xproj', fnamemodify(getcwd(), ':t')) 636 call assert_equal('Xproj', fnamemodify(getcwd(), ':t'))
636 cd .. 637 call chdir(save_cwd)
638 %bwipe
637 639
638 set sessionoptions& 640 set sessionoptions&
639 call delete('Xproj', 'rf') 641 call delete('Xproj', 'rf')
640 endfunc 642 endfunc
641 643