]> granicus.if.org Git - vim/commitdiff
patch 8.2.1273: MS-Windows: terminal test may leave file behind v8.2.1273
authorBram Moolenaar <Bram@vim.org>
Wed, 22 Jul 2020 20:23:40 +0000 (22:23 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 22 Jul 2020 20:23:40 +0000 (22:23 +0200)
Problem:    MS-Windows: terminal test may leave file behind.
Solution:   Wait a moment for process to end before deleting the file.
            (Taro Muraoka, closes #6513)

src/testdir/test_terminal.vim
src/version.c

index 067fa0f0934dd2c49c36b68d5995be225d76e646..fcc11565cdfa121358bcef6945476b9ab125e2fb 100644 (file)
@@ -808,6 +808,13 @@ func Test_terminal_redir_file()
   endif
   let g:job = term_getjob(buf)
   call WaitForAssert({-> assert_equal("dead", job_status(g:job))})
+
+  if has('win32')
+    " On Windows we cannot delete a file being used by a process.  When
+    " job_status() returns "dead", the process remains for a short time.
+    " Just wait for a moment.
+    sleep 50m
+  endif
   call delete('Xfile')
   bwipe
 
index 36951df40e5ebc722436533872d38b68cb11dadc..ed8f6c468551a28dd42f1f3aff61c1df2021c2ed 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1273,
 /**/
     1272,
 /**/