summaryrefslogtreecommitdiffstats
path: root/src/testdir/term_util.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-04-04 15:28:59 +0200
committerBram Moolenaar <Bram@vim.org>2021-04-04 15:28:59 +0200
commit3a6aadb3289be5114db6cce1c8c18b3f5f14d17c (patch)
tree709d46bd953b7fac34d720a8ffbe65f21582f565 /src/testdir/term_util.vim
parentceb06194337f1a9d30cd12edb7b0dc51830b9cb7 (diff)
patch 8.2.2708: test sometimes fails waiting for shell in terminalv8.2.2708
Problem: Test sometimes fails waiting for shell in terminal. Solution: Use WaitForAssert() so we can see the actual job status. Use Run_shell_in_terminal().
Diffstat (limited to 'src/testdir/term_util.vim')
-rw-r--r--src/testdir/term_util.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testdir/term_util.vim b/src/testdir/term_util.vim
index 8541ef353b..de87dd420e 100644
--- a/src/testdir/term_util.vim
+++ b/src/testdir/term_util.vim
@@ -23,7 +23,7 @@ endif
func StopShellInTerminal(buf)
call term_sendkeys(a:buf, "exit\r")
let job = term_getjob(a:buf)
- call WaitFor({-> job_status(job) == "dead"})
+ call WaitForAssert({-> assert_equal("dead", job_status(job))})
endfunc
" Wrapper around term_wait() to allow more time for re-runs of flaky tests
@@ -160,7 +160,7 @@ endfunc
" number.
func Run_shell_in_terminal(options)
if has('win32')
- let buf = term_start([&shell,'/k'], a:options)
+ let buf = term_start([&shell, '/k'], a:options)
else
let buf = term_start(&shell, a:options)
endif