Skip to content

Commit e738a1a

Browse files
committed
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)
1 parent 1514e8f commit e738a1a

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

src/testdir/test_terminal.vim

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -547,17 +547,14 @@ func Test_terminal_no_cmd()
547547
let pty = job_info(term_getjob(buf))['tty_out']
548548
call assert_notequal('', pty)
549549
if has('win32')
550-
silent exe '!cmd /c "echo look here > ' . pty . '"'
550+
silent exe '!start cmd /c "echo look here > ' . pty . '"'
551551
else
552552
call system('echo "look here" > ' . pty)
553553
endif
554-
call term_wait(buf)
554+
let g:buf = buf
555+
call WaitFor('term_getline(g:buf, 1) =~ "look here"')
555556

556-
let result = term_getline(buf, 1)
557-
if has('win32')
558-
let result = substitute(result, '\s\+$', '', '')
559-
endif
560-
call assert_equal('look here', result)
557+
call assert_match('look here', term_getline(buf, 1))
561558
bwipe!
562559
endfunc
563560

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
1117,
772774
/**/
773775
1116,
774776
/**/

0 commit comments

Comments
 (0)