Skip to content

Commit 51c2368

Browse files
committed
patch 8.0.0939: Test_terminal_env is flaky
Problem: Test_terminal_env is flaky. (James McCoy) Solution: Use WaitFor() instead of term_wait().
1 parent 6bb18a8 commit 51c2368

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/testdir/test_terminal.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,11 +410,12 @@ func Test_terminal_env()
410410
return
411411
endif
412412
let buf = Run_shell_in_terminal({'env': {'TESTENV': 'correct'}})
413-
call term_wait(buf)
413+
" Wait for the shell to display a prompt
414+
call WaitFor('term_getline(1) != ""')
414415
call term_sendkeys(buf, "echo $TESTENV\r")
415416
call term_wait(buf)
416417
call Stop_shell_in_terminal(buf)
417-
call term_wait(buf)
418+
call WaitFor('getline(2) == "correct"')
418419
call assert_equal('correct', getline(2))
419420

420421
exe buf . 'bwipe'

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+
939,
772774
/**/
773775
938,
774776
/**/

0 commit comments

Comments
 (0)