]> granicus.if.org Git - vim/commitdiff
patch 8.0.0939: Test_terminal_env is flaky v8.0.0939
authorBram Moolenaar <Bram@vim.org>
Mon, 14 Aug 2017 19:45:00 +0000 (21:45 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 14 Aug 2017 19:45:00 +0000 (21:45 +0200)
Problem:    Test_terminal_env is flaky. (James McCoy)
Solution:   Use WaitFor() instead of term_wait().

src/testdir/test_terminal.vim
src/version.c

index e18087bbdb7ea88f27126a7bd3b8ea68816d9bbc..b311c3629ed4c0640b295d2371c775d34705e401 100644 (file)
@@ -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'
index a8b07dcbed01f5b65d0c5bd164352d51429b5aa7..4978e87722a4fb4ab9bb63e54367a0307b1d9521 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    939,
 /**/
     938,
 /**/