aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-11-19 23:45:28 -0500
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-11-19 23:45:44 -0500
commitf1d2297c5ece3463ae098b9cd779e067cbf653fa (patch)
treeddc7e3d0877799ccbad77f45deb182a92b8b674b
parentfdc2707b41a0c82bb621c2d437f775690bff45ee (diff)
downloadrneovim-f1d2297c5ece3463ae098b9cd779e067cbf653fa.tar.gz
rneovim-f1d2297c5ece3463ae098b9cd779e067cbf653fa.tar.bz2
rneovim-f1d2297c5ece3463ae098b9cd779e067cbf653fa.zip
vim-patch:8.0.1163: popup test is flaky
Problem: Popup test is flaky. Solution: Add a WaitFor() and fix another. https://github.com/vim/vim/commit/c79977a437d91306d576fb59e490601409503303
-rw-r--r--src/nvim/testdir/test_popup.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_popup.vim b/src/nvim/testdir/test_popup.vim
index 6fd58a1483..9cd591838c 100644
--- a/src/nvim/testdir/test_popup.vim
+++ b/src/nvim/testdir/test_popup.vim
@@ -681,14 +681,15 @@ func Test_popup_and_window_resize()
call term_wait(g:buf, 100)
call term_sendkeys(g:buf, "\<c-v>")
call term_wait(g:buf, 100)
+ call WaitFor('term_getline(g:buf, 1) =~ "^!"')
call assert_match('^!\s*$', term_getline(g:buf, 1))
exe 'resize +' . (h - 1)
call term_wait(g:buf, 100)
redraw!
- call WaitFor('"" == term_getline(g:buf, 1)')
+ call WaitFor('term_getline(g:buf, 1) == ""')
call assert_equal('', term_getline(g:buf, 1))
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))
bwipe!
endfunc