changeset 29542:61b400b5e1a8 v9.0.0112

patch 9.0.0112: MS-Windows: test fails because file already exists Commit: https://github.com/vim/vim/commit/0f823c360947779d9de6048c6bce51c670a06eb6 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 30 15:35:12 2022 +0100 patch 9.0.0112: MS-Windows: test fails because file already exists Problem: MS-Windows: test fails because file already exists. Solution: Wait a little while until the file is gone.
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 Jul 2022 16:45:04 +0200
parents bc0ca8c97c25
children b679513dc17c
files src/testdir/test_shortpathname.vim src/version.c
diffstat 2 files changed, 17 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_shortpathname.vim
+++ b/src/testdir/test_shortpathname.vim
@@ -19,12 +19,22 @@ endfunc
 func Test_ColonEight()
   let save_dir = getcwd()
 
-  " This could change for CygWin to //cygdrive/c
+  " This could change for CygWin to //cygdrive/c .
   let dir1 = 'c:/x.x.y'
-  if filereadable(dir1) || isdirectory(dir1)
-    call assert_report("Fatal: '" . dir1 . "' exists, cannot run test")
-    return
-  endif
+  let trycount = 5
+  while 1
+    if !filereadable(dir1) && !isdirectory(dir1)
+      break
+    endif
+    if trycount == 1
+      call assert_report("Fatal: '" . dir1 . "' exists, cannot run this test")
+      return
+    endif
+    " When tests run in parallel the directory may exist, wait a bit until it
+    " is gone.
+    sleep 5
+    let trycount -= 1
+  endwhile
 
   let file1 = dir1 . '/zz.y.txt'
   let nofile1 = dir1 . '/z.y.txt'
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    112,
+/**/
     111,
 /**/
     110,