patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why
Problem: In tests, when WaitFor() fails it doesn't say why.
Solution: Turn a few more WaitFor() into WaitForAssert().
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index 93a0343..c923e9d 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -494,7 +494,7 @@
call writefile(lines, 'Xsearch.txt')
let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3})
- call WaitFor({-> lines == [term_getline(buf, 1), term_getline(buf, 2)] })
+ call WaitForAssert({-> assert_equal(lines, [term_getline(buf, 1), term_getline(buf, 2)])})
call term_sendkeys(buf, ":set incsearch hlsearch\<cr>")
call term_sendkeys(buf, ":14vsp\<cr>")
@@ -619,7 +619,7 @@
call writefile(lines, 'Xsearch.txt')
let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3})
- call WaitFor({-> lines == [term_getline(buf, 1), term_getline(buf, 2)] })
+ call WaitForAssert({-> assert_equal(lines, [term_getline(buf, 1), term_getline(buf, 2)])})
" wait for vim to complete initialization
call term_wait(buf)