changeset 21445:ae23caa42dac v8.2.1273

patch 8.2.1273: MS-Windows: terminal test may leave file behind Commit: https://github.com/vim/vim/commit/c69950ac17225d07f973b39d5b0eb94291077808 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 22 22:23:40 2020 +0200 patch 8.2.1273: MS-Windows: terminal test may leave file behind 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)
author Bram Moolenaar <Bram@vim.org>
date Wed, 22 Jul 2020 22:30:03 +0200
parents 3486d4432a92
children 915a804a5971
files src/testdir/test_terminal.vim src/version.c
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -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
 
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1273,
+/**/
     1272,
 /**/
     1271,