0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

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 #5187)
This commit is contained in:
Bram Moolenaar
2019-11-09 18:06:04 +01:00
parent 1e15e61188
commit 5bf46e9786
2 changed files with 7 additions and 3 deletions

View File

@@ -276,8 +276,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('Xtabdir3', fnamemodify(getcwd(1, 3), ':t')) call assert_equal('Xtabdir3', fnamemodify(getcwd(1, 3), ':t'))
call assert_equal('Xwindir3', fnamemodify(getcwd(2, 3), ':t')) call assert_equal('Xwindir3', fnamemodify(getcwd(2, 3), ':t'))
only | tabonly %bwipe
exe 'cd ' . save_cwd call chdir(save_cwd)
call delete("Xtopdir", "rf") call delete("Xtopdir", "rf")
endfunc endfunc
@@ -623,6 +623,7 @@ endfunc
" Test for changing directory to the session file directory " Test for changing directory to the session file directory
func Test_mksession_sesdir() func Test_mksession_sesdir()
let save_cwd = getcwd()
call mkdir('Xproj') call mkdir('Xproj')
mksession! Xproj/Xtest_mks1.out mksession! Xproj/Xtest_mks1.out
set sessionoptions-=curdir set sessionoptions-=curdir
@@ -633,7 +634,8 @@ func Test_mksession_sesdir()
call assert_equal('testdir', fnamemodify(getcwd(), ':t')) call assert_equal('testdir', fnamemodify(getcwd(), ':t'))
source Xproj/Xtest_mks2.out source Xproj/Xtest_mks2.out
call assert_equal('Xproj', fnamemodify(getcwd(), ':t')) call assert_equal('Xproj', fnamemodify(getcwd(), ':t'))
cd .. call chdir(save_cwd)
%bwipe
set sessionoptions& set sessionoptions&
call delete('Xproj', 'rf') call delete('Xproj', 'rf')

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2276,
/**/ /**/
2275, 2275,
/**/ /**/