diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-09-30 16:49:19 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-09-30 16:49:19 +0200 |
commit | f52c38315669f85bbcf3bd74c590148bf588f6c6 (patch) | |
tree | 676031e5b1538c284ab03900cd8a1fd3ed815cd4 /src/testdir/test_popup.vim | |
parent | 65ed136844fbaffdd473903ed841c944600234dc (diff) |
patch 8.0.1165: popup test is still flakyv8.0.1165
Problem: Popup test is still flaky.
Solution: Add a term_wait() call. (Ozaki Kiichi)
Diffstat (limited to 'src/testdir/test_popup.vim')
-rw-r--r-- | src/testdir/test_popup.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index 4ab860b813..0dfa956fb2 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -645,20 +645,26 @@ func Test_popup_and_window_resize() endif let g:buf = term_start([$VIMPROG, '--clean', '-c', 'set noswapfile'], {'term_rows': h / 3}) call term_sendkeys(g:buf, (h / 3 - 1)."o\<esc>G") + call term_wait(g:buf, 100) call term_sendkeys(g:buf, "i\<c-x>") call term_wait(g:buf, 100) call term_sendkeys(g:buf, "\<c-v>") call term_wait(g:buf, 100) + " popup first entry "!" must be at the top 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! + " popup shifted down, first line is now empty call WaitFor('term_getline(g:buf, 1) == ""') call assert_equal('', term_getline(g:buf, 1)) sleep 100m + " popup is below cursor line and shows first match "!" 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)) + " cursor line also shows ! + call assert_match('^!\s*$', term_getline(g:buf, term_getcursor(g:buf)[0])) bwipe! endfunc |