patch 8.0.0939: Test_terminal_env is flaky
Problem: Test_terminal_env is flaky. (James McCoy)
Solution: Use WaitFor() instead of term_wait().
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index e18087b..b311c36 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -410,11 +410,12 @@
return
endif
let buf = Run_shell_in_terminal({'env': {'TESTENV': 'correct'}})
- call term_wait(buf)
+ " Wait for the shell to display a prompt
+ call WaitFor('term_getline(1) != ""')
call term_sendkeys(buf, "echo $TESTENV\r")
call term_wait(buf)
call Stop_shell_in_terminal(buf)
- call term_wait(buf)
+ call WaitFor('getline(2) == "correct"')
call assert_equal('correct', getline(2))
exe buf . 'bwipe'
diff --git a/src/version.c b/src/version.c
index a8b07dc..4978e87 100644
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 939,
+/**/
938,
/**/
937,