changeset 12118:bf53df1f17ba v8.0.0939

patch 8.0.0939: Test_terminal_env is flaky commit https://github.com/vim/vim/commit/51c23687a9298c27d41ad9780b032f434e1e1646 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 14 21:45:00 2017 +0200 patch 8.0.0939: Test_terminal_env is flaky Problem: Test_terminal_env is flaky. (James McCoy) Solution: Use WaitFor() instead of term_wait().
author Christian Brabandt <cb@256bit.org>
date Mon, 14 Aug 2017 22:00:06 +0200
parents b8426b79c762
children a7e24c12df21
files src/testdir/test_terminal.vim src/version.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -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'
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    939,
+/**/
     938,
 /**/
     937,