Mercurial > vim
comparison src/testdir/test_popup.vim @ 12570:871dc52ee7d7 v8.0.1163
patch 8.0.1163: popup test is flaky
commit https://github.com/vim/vim/commit/c79977a437d91306d576fb59e490601409503303
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 30 14:39:27 2017 +0200
patch 8.0.1163: popup test is flaky
Problem: Popup test is flaky.
Solution: Add a WaitFor() and fix another.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 30 Sep 2017 14:45:04 +0200 |
parents | 33a900199c25 |
children | 575d530df053 |
comparison
equal
deleted
inserted
replaced
12569:0f4720c58aa4 | 12570:871dc52ee7d7 |
---|---|
647 call term_sendkeys(g:buf, (h / 3 - 1)."o\<esc>G") | 647 call term_sendkeys(g:buf, (h / 3 - 1)."o\<esc>G") |
648 call term_sendkeys(g:buf, "i\<c-x>") | 648 call term_sendkeys(g:buf, "i\<c-x>") |
649 call term_wait(g:buf, 100) | 649 call term_wait(g:buf, 100) |
650 call term_sendkeys(g:buf, "\<c-v>") | 650 call term_sendkeys(g:buf, "\<c-v>") |
651 call term_wait(g:buf, 100) | 651 call term_wait(g:buf, 100) |
652 call WaitFor('term_getline(g:buf, 1) =~ "^!"') | |
652 call assert_match('^!\s*$', term_getline(g:buf, 1)) | 653 call assert_match('^!\s*$', term_getline(g:buf, 1)) |
653 exe 'resize +' . (h - 1) | 654 exe 'resize +' . (h - 1) |
654 call term_wait(g:buf, 100) | 655 call term_wait(g:buf, 100) |
655 redraw! | 656 redraw! |
656 call WaitFor('"" == term_getline(g:buf, 1)') | 657 call WaitFor('term_getline(g:buf, 1) == ""') |
657 call assert_equal('', term_getline(g:buf, 1)) | 658 call assert_equal('', term_getline(g:buf, 1)) |
658 sleep 100m | 659 sleep 100m |
659 call WaitFor('"^!" =~ term_getline(g:buf, term_getcursor(g:buf)[0] + 1)') | 660 call WaitFor('term_getline(g:buf, term_getcursor(g:buf)[0] + 1) =~ "^!"') |
660 call assert_match('^!\s*$', term_getline(g:buf, term_getcursor(g:buf)[0] + 1)) | 661 call assert_match('^!\s*$', term_getline(g:buf, term_getcursor(g:buf)[0] + 1)) |
661 bwipe! | 662 bwipe! |
662 endfunc | 663 endfunc |
663 | 664 |
664 " vim: shiftwidth=2 sts=2 expandtab | 665 " vim: shiftwidth=2 sts=2 expandtab |