Mercurial > vim
diff src/testdir/test_popup.vim @ 13808:16a062cf08c2 v8.0.1776
patch 8.0.1776: in tests, when WaitFor() fails it doesn't say why
commit https://github.com/vim/vim/commit/0e9d1ae3216a5940b36bb56d155fb300b2e55b00
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Apr 30 14:28:24 2018 +0200
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().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 30 Apr 2018 14:30:07 +0200 |
parents | a86677cf8446 |
children | 08370aad873d |
line wrap: on
line diff
--- 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!