diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-14 21:45:00 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-14 21:45:00 +0200 |
commit | 51c23687a9298c27d41ad9780b032f434e1e1646 (patch) | |
tree | 534d13a62d76bc167ae60564b6051bdfddc8da12 /src/testdir/test_terminal.vim | |
parent | 6bb18a878cc4cc79cdca4b7497367e59a90125e7 (diff) | |
download | vim-git-51c23687a9298c27d41ad9780b032f434e1e1646.tar.gz |
patch 8.0.0939: Test_terminal_env is flakyv8.0.0939
Problem: Test_terminal_env is flaky. (James McCoy)
Solution: Use WaitFor() instead of term_wait().
Diffstat (limited to 'src/testdir/test_terminal.vim')
-rw-r--r-- | src/testdir/test_terminal.vim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index e18087bbd..b311c3629 100644 --- 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' |