0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

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)
This commit is contained in:
Bram Moolenaar
2020-07-22 22:23:40 +02:00
parent 4cdb13ce81
commit c69950ac17
2 changed files with 9 additions and 0 deletions

View 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

View File

@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1273,
/**/
1272,
/**/