diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-08 21:50:25 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-08 21:50:25 +0200 |
commit | 6a2c5a7dd5c9215cc030d5ea6e4616d782c091dd (patch) | |
tree | c3c2d559b959ba7b6776212f5e071683b8079a96 /src/testdir/test_search.vim | |
parent | 7035fd9d909c49cf5105a53753c1772c193d05b8 (diff) | |
download | vim-git-6a2c5a7dd5c9215cc030d5ea6e4616d782c091dd.tar.gz |
patch 8.2.0533: tests using term_wait() can still be flakyv8.2.0533
Problem: Tests using term_wait() can still be flaky.
Solution: Increase the wait time when rerunning a test. (James McCoy,
closes #5899) Halve the initial times to make tests run faster
when there is no rerun.
Diffstat (limited to 'src/testdir/test_search.vim')
-rw-r--r-- | src/testdir/test_search.vim | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim index b17e45084..fcbadfd20 100644 --- a/src/testdir/test_search.vim +++ b/src/testdir/test_search.vim @@ -672,7 +672,7 @@ func Test_search_cmdline8() call term_sendkeys(buf, "/vim\<cr>") call term_sendkeys(buf, "/b\<esc>") call term_sendkeys(buf, "gg0") - call term_wait(buf, 500) + call TermWait(buf, 250) let screen_line = term_scrape(buf, 1) let [a0,a1,a2,a3] = [screen_line[3].attr, screen_line[4].attr, \ screen_line[18].attr, screen_line[19].attr] @@ -792,12 +792,12 @@ func Test_search_cmdline_incsearch_highlight_attr() call WaitForAssert({-> assert_equal(lines, [term_getline(buf, 1), term_getline(buf, 2)])}) " wait for vim to complete initialization - call term_wait(buf) + call TermWait(buf) " Get attr of normal(a0), incsearch(a1), hlsearch(a2) highlight call term_sendkeys(buf, ":set incsearch hlsearch\<cr>") call term_sendkeys(buf, '/b') - call term_wait(buf, 200) + call TermWait(buf, 100) let screen_line1 = term_scrape(buf, 1) call assert_true(len(screen_line1) > 2) " a0: attr_normal @@ -813,7 +813,7 @@ func Test_search_cmdline_incsearch_highlight_attr() " Test incremental highlight search call term_sendkeys(buf, "/vim") - call term_wait(buf, 200) + call TermWait(buf, 100) " Buffer: " abb vim vim vi " vimvivim @@ -825,7 +825,7 @@ func Test_search_cmdline_incsearch_highlight_attr() " Test <C-g> call term_sendkeys(buf, "\<C-g>\<C-g>") - call term_wait(buf, 200) + call TermWait(buf, 100) let attr_line1 = [a0,a0,a0,a0,a2,a2,a2,a0,a2,a2,a2,a0,a0,a0] let attr_line2 = [a1,a1,a1,a0,a0,a2,a2,a2] call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1], 'v:val.attr')) @@ -833,7 +833,7 @@ func Test_search_cmdline_incsearch_highlight_attr() " Test <C-t> call term_sendkeys(buf, "\<C-t>") - call term_wait(buf, 200) + call TermWait(buf, 100) let attr_line1 = [a0,a0,a0,a0,a2,a2,a2,a0,a1,a1,a1,a0,a0,a0] let attr_line2 = [a2,a2,a2,a0,a0,a2,a2,a2] call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1], 'v:val.attr')) @@ -841,7 +841,7 @@ func Test_search_cmdline_incsearch_highlight_attr() " Type Enter and a1(incsearch highlight) should become a2(hlsearch highlight) call term_sendkeys(buf, "\<cr>") - call term_wait(buf, 200) + call TermWait(buf, 100) let attr_line1 = [a0,a0,a0,a0,a2,a2,a2,a0,a2,a2,a2,a0,a0,a0] let attr_line2 = [a2,a2,a2,a0,a0,a2,a2,a2] call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1], 'v:val.attr')) @@ -851,7 +851,7 @@ func Test_search_cmdline_incsearch_highlight_attr() call term_sendkeys(buf, ":1\<cr>") call term_sendkeys(buf, ":set nohlsearch\<cr>") call term_sendkeys(buf, "/vim") - call term_wait(buf, 200) + call TermWait(buf, 100) let attr_line1 = [a0,a0,a0,a0,a1,a1,a1,a0,a0,a0,a0,a0,a0,a0] let attr_line2 = [a0,a0,a0,a0,a0,a0,a0,a0] call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1], 'v:val.attr')) |