diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-20 18:29:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-20 18:29:13 +0200 |
commit | 17f67547f36a06220ea4667aaee7bb130108f568 (patch) | |
tree | 9d693f90428489894b9973ef729b994df4f25b31 | |
parent | b8a9296cedb9fae35572041ef5cfa894f3ad9fbb (diff) | |
download | vim-git-17f67547f36a06220ea4667aaee7bb130108f568.tar.gz |
patch 8.2.1497: CursorHold test is flakyv8.2.1497
Problem: CursorHold test is flaky. (Jakub Kądziołka)
Solution: Use WaitForAssert() (closes #6754)
-rw-r--r-- | src/testdir/test_autocmd.vim | 11 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index ca8cc04c2..73674a288 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -29,20 +29,19 @@ func Test_CursorHold_autocmd() END call writefile(before, 'Xinit') let buf = RunVimInTerminal('-S Xinit Xfile', {}) - call term_wait(buf) + call term_sendkeys(buf, "G") + call term_wait(buf, 20) call term_sendkeys(buf, "gg") call term_wait(buf) - sleep 50m + call WaitForAssert({-> assert_equal(['1'], readfile('Xoutput')[-1:-1])}) call term_sendkeys(buf, "j") call term_wait(buf) - sleep 50m + call WaitForAssert({-> assert_equal(['1', '2'], readfile('Xoutput')[-2:-1])}) call term_sendkeys(buf, "j") call term_wait(buf) - sleep 50m + call WaitForAssert({-> assert_equal(['1', '2', '3'], readfile('Xoutput')[-3:-1])}) call StopVimInTerminal(buf) - call assert_equal(['1', '2', '3'], readfile('Xoutput')[-3:-1]) - call delete('Xinit') call delete('Xoutput') call delete('Xfile') diff --git a/src/version.c b/src/version.c index c2057b318..28400fbff 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1497, +/**/ 1496, /**/ 1495, |