Skip to content

Commit eef0531

Browse files
committed
patch 8.0.0979: terminal noblock test fails on MS-Windows
Problem: Terminal noblock test fails on MS-Windows. (Christian Brabandt) Solution: Ignore empty line below "done".
1 parent 37819ed commit eef0531

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/testdir/test_terminal.vim

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,16 @@ func Test_terminal_noblock()
458458
call term_sendkeys(g:buf, 'echo ' . repeat(c, 5000) . "\<cr>")
459459
endfor
460460
call term_sendkeys(g:buf, "echo done\<cr>")
461+
462+
" On MS-Windows there is an extra empty line below "done". Find "done" in
463+
" the last-but-one or the last-but-two line.
461464
let g:lnum = term_getsize(g:buf)[0] - 1
462-
call WaitFor('term_getline(g:buf, g:lnum) =~ "done"', 3000)
463-
call assert_match('done', term_getline(g:buf, g:lnum))
465+
call WaitFor('term_getline(g:buf, g:lnum) =~ "done" || term_getline(g:buf, g:lnum - 1) =~ "done"', 3000)
466+
let line = term_getline(g:buf, g:lnum)
467+
if line !~ 'done'
468+
let line = term_getline(g:buf, g:lnum - 1)
469+
endif
470+
call assert_match('done', line)
464471

465472
let g:job = term_getjob(g:buf)
466473
call Stop_shell_in_terminal(g:buf)

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+
979,
772774
/**/
773775
978,
774776
/**/

0 commit comments

Comments
 (0)