diff options
author | shadmansaleh <shadmansaleh3@gmail.com> | 2021-04-20 22:38:22 +0600 |
---|---|---|
committer | shadmansaleh <shadmansaleh3@gmail.com> | 2021-05-09 06:37:01 +0600 |
commit | 5c404ad0fa55b8420579d283710333a82f716d6b (patch) | |
tree | 56d63fb6828df43163e5daaff50385cb5a374258 | |
parent | 420344324e3abcb9766d03b08758e719aee746d0 (diff) | |
download | rneovim-5c404ad0fa55b8420579d283710333a82f716d6b.tar.gz rneovim-5c404ad0fa55b8420579d283710333a82f716d6b.tar.bz2 rneovim-5c404ad0fa55b8420579d283710333a82f716d6b.zip |
vim-patch:8.2.0884: searchcount() test fails on slower systems
Problem: Searchcount() test fails on slower systems.
Solution: Set a longer timeout.
https://github.com/vim/vim/commit/ea6561af92eeb26fa0b4966575da7cadd98af1cd
-rw-r--r-- | src/nvim/search.h | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_search_stat.vim | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/search.h b/src/nvim/search.h index 07e1062ac7..98ddaa5eeb 100644 --- a/src/nvim/search.h +++ b/src/nvim/search.h @@ -51,7 +51,7 @@ #define RE_LAST 2 /* use last used pattern if "pat" is NULL */ // Values for searchcount() -#define SEARCH_STAT_DEF_TIMEOUT 20L +#define SEARCH_STAT_DEF_TIMEOUT 40L #define SEARCH_STAT_DEF_MAX_COUNT 99 #define SEARCH_STAT_BUF_LEN 12 diff --git a/src/nvim/testdir/test_search_stat.vim b/src/nvim/testdir/test_search_stat.vim index a642783c0e..3f94877d37 100644 --- a/src/nvim/testdir/test_search_stat.vim +++ b/src/nvim/testdir/test_search_stat.vim @@ -87,10 +87,10 @@ func Test_search_stat() \ searchcount(#{recompute: 0})) call assert_equal( \ #{current: 272, exact_match: 1, total: 280, incomplete: 0, maxcount: 0}, - \ searchcount(#{recompute: v:true, maxcount: 0})) + \ searchcount(#{recompute: v:true, maxcount: 0, timeout: 200})) call assert_equal( \ #{current: 1, exact_match: 1, total: 280, incomplete: 0, maxcount: 0}, - \ searchcount(#{recompute: 1, maxcount: 0, pos: [1, 1, 0]})) + \ searchcount(#{recompute: 1, maxcount: 0, pos: [1, 1, 0], timeout: 200})) call cursor(line('$'), 1) let g:a = execute(':unsilent :norm! n') let stat = 'W \[1/>99\]' @@ -100,10 +100,10 @@ func Test_search_stat() \ searchcount(#{recompute: 0})) call assert_equal( \ #{current: 1, exact_match: 1, total: 280, incomplete: 0, maxcount: 0}, - \ searchcount(#{recompute: 1, maxcount: 0})) + \ searchcount(#{recompute: 1, maxcount: 0, timeout: 200})) call assert_equal( \ #{current: 271, exact_match: 1, total: 280, incomplete: 0, maxcount: 0}, - \ searchcount(#{recompute: 1, maxcount: 0, pos: [line('$')-2, 1, 0]})) + \ searchcount(#{recompute: 1, maxcount: 0, pos: [line('$')-2, 1, 0], timeout: 200})) " Many matches call cursor(1, 1) |