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.
diff --git a/src/testdir/test_job_fails.vim b/src/testdir/test_job_fails.vim
index 22637c0..affcb7d 100644
--- a/src/testdir/test_job_fails.vim
+++ b/src/testdir/test_job_fails.vim
@@ -8,9 +8,9 @@
if has('job')
let job = job_start('axdfxsdf')
if has('unix')
- call WaitFor({-> job_status(job) == "dead"})
+ call WaitForAssert({-> assert_equal("dead", job_status(job))})
else
- call WaitFor({-> job_status(job) == "fail"})
+ call WaitForAssert({-> assert_equal("fail", job_status(job))})
endif
endif
endfunc