1
0
forked from aniani/vim

patch 8.0.1117: Test_terminal_no_cmd hangs on MS-Windows with GUI

Problem:    Test_terminal_no_cmd hangs on MS-Windows with GUI. (Christian
            Brabandt)
Solution:   Run the command with "start" and wait for the text to appear.
            (micbou, closes #2096)
This commit is contained in:
Bram Moolenaar 2017-09-16 17:42:41 +02:00
parent 1514e8f427
commit e738a1a033
2 changed files with 6 additions and 7 deletions

View File

@ -547,17 +547,14 @@ func Test_terminal_no_cmd()
let pty = job_info(term_getjob(buf))['tty_out']
call assert_notequal('', pty)
if has('win32')
silent exe '!cmd /c "echo look here > ' . pty . '"'
silent exe '!start cmd /c "echo look here > ' . pty . '"'
else
call system('echo "look here" > ' . pty)
endif
call term_wait(buf)
let g:buf = buf
call WaitFor('term_getline(g:buf, 1) =~ "look here"')
let result = term_getline(buf, 1)
if has('win32')
let result = substitute(result, '\s\+$', '', '')
endif
call assert_equal('look here', result)
call assert_match('look here', term_getline(buf, 1))
bwipe!
endfunc

View File

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