Skip to content

Commit 5319191

Browse files
committed
patch 8.1.0088: terminal test for stdout and stderr is a bit flaky
Problem: Terminal test for stdout and stderr is a bit flaky. Solution: Wait for both stdout and stderr to have been processed. (Ozaki Kiichi, closes #2991)
1 parent f9c3883 commit 5319191

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/testdir/test_terminal.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,8 +1487,9 @@ func Test_terminal_out_err()
14871487

14881488
let outfile = 'Xtermstdout'
14891489
let buf = term_start(['./Xechoerrout.sh'], {'out_io': 'file', 'out_name': outfile})
1490-
call WaitForAssert({-> assert_inrange(1, 2, len(readfile(outfile)))})
1491-
call assert_equal("this is standard out", readfile(outfile)[0])
1490+
1491+
call WaitFor({-> !empty(readfile(outfile)) && !empty(term_getline(buf, 1))})
1492+
call assert_equal(['this is standard out'], readfile(outfile))
14921493
call assert_equal('this is standard error', term_getline(buf, 1))
14931494

14941495
call WaitForAssert({-> assert_equal('dead', job_status(term_getjob(buf)))})

src/version.c

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

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
88,
764766
/**/
765767
87,
766768
/**/

0 commit comments

Comments
 (0)