1
0
forked from aniani/vim

patch 8.0.1163: popup test is flaky

Problem:    Popup test is flaky.
Solution:   Add a WaitFor() and fix another.
This commit is contained in:
Bram Moolenaar
2017-09-30 14:39:27 +02:00
parent 660b85e39a
commit c79977a437
2 changed files with 5 additions and 2 deletions

View File

@@ -649,14 +649,15 @@ func Test_popup_and_window_resize()
call term_wait(g:buf, 100) call term_wait(g:buf, 100)
call term_sendkeys(g:buf, "\<c-v>") call term_sendkeys(g:buf, "\<c-v>")
call term_wait(g:buf, 100) call term_wait(g:buf, 100)
call WaitFor('term_getline(g:buf, 1) =~ "^!"')
call assert_match('^!\s*$', term_getline(g:buf, 1)) call assert_match('^!\s*$', term_getline(g:buf, 1))
exe 'resize +' . (h - 1) exe 'resize +' . (h - 1)
call term_wait(g:buf, 100) call term_wait(g:buf, 100)
redraw! redraw!
call WaitFor('"" == term_getline(g:buf, 1)') call WaitFor('term_getline(g:buf, 1) == ""')
call assert_equal('', term_getline(g:buf, 1)) call assert_equal('', term_getline(g:buf, 1))
sleep 100m sleep 100m
call WaitFor('"^!" =~ term_getline(g:buf, term_getcursor(g:buf)[0] + 1)') call WaitFor('term_getline(g:buf, term_getcursor(g:buf)[0] + 1) =~ "^!"')
call assert_match('^!\s*$', term_getline(g:buf, term_getcursor(g:buf)[0] + 1)) call assert_match('^!\s*$', term_getline(g:buf, term_getcursor(g:buf)[0] + 1))
bwipe! bwipe!
endfunc endfunc

View File

@@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1163,
/**/ /**/
1162, 1162,
/**/ /**/