Permalink
Browse files

patch 8.0.0939: Test_terminal_env is flaky

Problem:    Test_terminal_env is flaky. (James McCoy)
Solution:   Use WaitFor() instead of term_wait().
  • Loading branch information...
brammool committed Aug 14, 2017
1 parent 6bb18a8 commit 51c23687a9298c27d41ad9780b032f434e1e1646
Showing with 5 additions and 2 deletions.
  1. +3 −2 src/testdir/test_terminal.vim
  2. +2 −0 src/version.c
@@ -410,11 +410,12 @@ func Test_terminal_env()
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'
View
@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
939,
/**/
938,
/**/

0 comments on commit 51c2368

Please sign in to comment.