diff src/testdir/term_util.vim @ 24335:3f96a5dc0c53 v8.2.2708

patch 8.2.2708: test sometimes fails waiting for shell in terminal Commit: https://github.com/vim/vim/commit/3a6aadb3289be5114db6cce1c8c18b3f5f14d17c Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 4 15:28:59 2021 +0200 patch 8.2.2708: test sometimes fails waiting for shell in terminal 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().
author Bram Moolenaar <Bram@vim.org>
date Sun, 04 Apr 2021 15:30:03 +0200
parents 949238ccbd50
children 8bb07c88ac27
line wrap: on
line diff
--- 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