]> granicus.if.org Git - vim/commitdiff
patch 9.0.0112: MS-Windows: test fails because file already exists v9.0.0112
authorBram Moolenaar <Bram@vim.org>
Sat, 30 Jul 2022 14:35:12 +0000 (15:35 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 30 Jul 2022 14:35:12 +0000 (15:35 +0100)
Problem:    MS-Windows: test fails because file already exists.
Solution:   Wait a little while until the file is gone.

src/testdir/test_shortpathname.vim
src/version.c

index 13fc07999dcbf0bdd57b76ca64e011ef1e821cfe..79b7899c86ba336e87d9893478f6c773204fd656 100644 (file)
@@ -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'
index 3ba672db5d2df6390744a1529a82e84554793f96..4a79784b2917edb5099cdfccb22f385a9393cc28 100644 (file)
@@ -735,6 +735,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    112,
 /**/
     111,
 /**/