]> granicus.if.org Git - vim/commitdiff
patch 8.1.2276: MS-Windows: session test leaves files behind v8.1.2276
authorBram Moolenaar <Bram@vim.org>
Sat, 9 Nov 2019 17:06:04 +0000 (18:06 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 9 Nov 2019 17:06:04 +0000 (18:06 +0100)
Problem:    MS-Windows: session test leaves files behind.
Solution:   Wipe out buffers before deleting the directory. (closes #5187)

src/testdir/test_mksession.vim
src/version.c

index d713da73e80e1209da9668cc5156e0189544042a..a3712a37dd448d936688b106cedc6bb9ca1a97bd 100644 (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('Xwindir3', fnamemodify(getcwd(2, 3), ':t'))
-  only | tabonly
-  exe 'cd ' . save_cwd
+  %bwipe
+  call chdir(save_cwd)
   call delete("Xtopdir", "rf")
 endfunc
 
@@ -623,6 +623,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
@@ -633,7 +634,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')
index 44149ff0ad7d6fb1ea7b0dbd40724dffcd77da07..fc6808b9cfac7d3731f5f896b596c79e08cde6a8 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2276,
 /**/
     2275,
 /**/