changeset 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 be63c60a2345
children fca83ebd451c
files src/testdir/test_mksession.vim src/version.c
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_mksession.vim
+++ b/src/testdir/test_mksession.vim
@@ -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')
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2276,
+/**/
     2275,
 /**/
     2274,