diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-04-30 14:28:24 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-04-30 14:28:24 +0200 |
commit | 0e9d1ae3216a5940b36bb56d155fb300b2e55b00 (patch) | |
tree | 767c007fd1c9241730dd2f9053614e41837475a7 /src/testdir/test_popup.vim | |
parent | 850d427f070a61267ef384a449992e72d2bea12c (diff) | |
download | vim-git-0e9d1ae3216a5940b36bb56d155fb300b2e55b00.tar.gz |
patch 8.0.1776: in tests, when WaitFor() fails it doesn't say whyv8.0.1776
Problem: In tests, when WaitFor() fails it doesn't say why.
Solution: Turn a few more WaitFor() into WaitForAssert().
Diffstat (limited to 'src/testdir/test_popup.vim')
-rw-r--r-- | src/testdir/test_popup.vim | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index ed3198585..d682dd211 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -649,18 +649,15 @@ func Test_popup_and_window_resize() call term_sendkeys(buf, "\<c-v>") call term_wait(buf, 100) " popup first entry "!" must be at the top - call WaitFor({-> term_getline(buf, 1) =~ "^!"}) - call assert_match('^!\s*$', term_getline(buf, 1)) + call WaitForAssert({-> assert_match('^!\s*$', term_getline(buf, 1))}) exe 'resize +' . (h - 1) call term_wait(buf, 100) redraw! " popup shifted down, first line is now empty - call WaitFor({-> term_getline(buf, 1) == ""}) - call assert_equal('', term_getline(buf, 1)) + call WaitForAssert({-> assert_equal('', term_getline(buf, 1))}) sleep 100m " popup is below cursor line and shows first match "!" - call WaitFor({-> term_getline(buf, term_getcursor(buf)[0] + 1) =~ "^!"}) - call assert_match('^!\s*$', term_getline(buf, term_getcursor(buf)[0] + 1)) + call WaitForAssert({-> assert_match('^!\s*$', term_getline(buf, term_getcursor(buf)[0] + 1))}) " cursor line also shows ! call assert_match('^!\s*$', term_getline(buf, term_getcursor(buf)[0])) bwipe! |