diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-04-28 21:34:40 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-04-28 21:34:40 +0200 |
commit | 50182fa84e20a0547f3e2bd6683ef799fcd27855 (patch) | |
tree | e68877870cf854837d637d83208edbd114ce185c /src/testdir/test_autocmd.vim | |
parent | 65a5464985f980d2bbbf4e14d39d416dce065ec7 (diff) |
patch 8.0.1771: in tests, when WaitFor() fails it doesn't say whyv8.0.1771
Problem: In tests, when WaitFor() fails it doesn't say why. (James McCoy)
Solution: Add WaitForAssert(), which produces an assert error when it fails.
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r-- | src/testdir/test_autocmd.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index 1c34e3049b..19c54d1567 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -1322,11 +1322,11 @@ func Test_Changed_FirstTime() let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': 3}) call assert_equal('running', term_getstatus(buf)) " Wait for the ruler (in the status line) to be shown. - call WaitFor({-> term_getline(buf, 3) =~# '\<All$'}) + call WaitForAssert({-> assert_match('\<All$', term_getline(buf, 3))}) " It's only adding autocmd, so that no event occurs. call term_sendkeys(buf, ":au! TextChanged <buffer> call writefile(['No'], 'Xchanged.txt')\<cr>") call term_sendkeys(buf, "\<C-\\>\<C-N>:qa!\<cr>") - call WaitFor({-> term_getstatus(buf) == 'finished'}) + call WaitForAssert({-> assert_equal('finished', term_getstatus(buf))}) call assert_equal([''], readfile('Xchanged.txt')) " clean up |