diff src/testdir/test_terminal.vim @ 13798:415185e2c970 v8.0.1771

patch 8.0.1771: in tests, when WaitFor() fails it doesn't say why commit https://github.com/vim/vim/commit/50182fa84e20a0547f3e2bd6683ef799fcd27855 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 28 21:34:40 2018 +0200 patch 8.0.1771: in tests, when WaitFor() fails it doesn't say why Problem: In tests, when WaitFor() fails it doesn't say why. (James McCoy) Solution: Add WaitForAssert(), which produces an assert error when it fails.
author Christian Brabandt <cb@256bit.org>
date Sat, 28 Apr 2018 21:45:06 +0200
parents 3ab6198c1f9a
children 16a062cf08c2
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -83,8 +83,7 @@ func Test_terminal_wipe_buffer()
   let buf = Run_shell_in_terminal({})
   call assert_fails(buf . 'bwipe', 'E517')
   exe buf . 'bwipe!'
-  call WaitFor('job_status(g:job) == "dead"')
-  call assert_equal('dead', job_status(g:job))
+  call WaitForAssert({-> assert_equal('dead', job_status(g:job))})
   call assert_equal("", bufname(buf))
 
   unlet g:job
@@ -100,7 +99,7 @@ func Test_terminal_split_quit()
   call assert_equal('run', job_status(g:job))
 
   quit!
-  call WaitFor('job_status(g:job) == "dead"')
+  call WaitForAssert({-> assert_equal('dead', job_status(g:job))})
   call assert_equal('dead', job_status(g:job))
 
   exe buf . 'bwipe'