comparison src/testdir/test_search_stat.vim @ 20661:c7843f009ecf v8.2.0884

patch 8.2.0884: searchcount() test fails on slower systems Commit: https://github.com/vim/vim/commit/ea6561af92eeb26fa0b4966575da7cadd98af1cd Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 1 21:32:45 2020 +0200 patch 8.2.0884: searchcount() test fails on slower systems Problem: Searchcount() test fails on slower systems. Solution: Set a longer timeout.
author Bram Moolenaar <Bram@vim.org>
date Mon, 01 Jun 2020 21:45:03 +0200
parents 8a2b86a39ef4
children a126f643d566
comparison
equal deleted inserted replaced
20660:9bc62a5518fb 20661:c7843f009ecf
85 call assert_equal( 85 call assert_equal(
86 \ #{current: 100, exact_match: 0, total: 100, incomplete: 2, maxcount: 99}, 86 \ #{current: 100, exact_match: 0, total: 100, incomplete: 2, maxcount: 99},
87 \ searchcount(#{recompute: 0})) 87 \ searchcount(#{recompute: 0}))
88 call assert_equal( 88 call assert_equal(
89 \ #{current: 272, exact_match: 1, total: 280, incomplete: 0, maxcount: 0}, 89 \ #{current: 272, exact_match: 1, total: 280, incomplete: 0, maxcount: 0},
90 \ searchcount(#{recompute: v:true, maxcount: 0})) 90 \ searchcount(#{recompute: v:true, maxcount: 0, timeout: 200}))
91 call assert_equal( 91 call assert_equal(
92 \ #{current: 1, exact_match: 1, total: 280, incomplete: 0, maxcount: 0}, 92 \ #{current: 1, exact_match: 1, total: 280, incomplete: 0, maxcount: 0},
93 \ searchcount(#{recompute: 1, maxcount: 0, pos: [1, 1, 0]})) 93 \ searchcount(#{recompute: 1, maxcount: 0, pos: [1, 1, 0], timeout: 200}))
94 call cursor(line('$'), 1) 94 call cursor(line('$'), 1)
95 let g:a = execute(':unsilent :norm! n') 95 let g:a = execute(':unsilent :norm! n')
96 let stat = 'W \[1/>99\]' 96 let stat = 'W \[1/>99\]'
97 call assert_match(pat .. stat, g:a) 97 call assert_match(pat .. stat, g:a)
98 call assert_equal( 98 call assert_equal(
99 \ #{current: 1, exact_match: 1, total: 100, incomplete: 2, maxcount: 99}, 99 \ #{current: 1, exact_match: 1, total: 100, incomplete: 2, maxcount: 99},
100 \ searchcount(#{recompute: 0})) 100 \ searchcount(#{recompute: 0}))
101 call assert_equal( 101 call assert_equal(
102 \ #{current: 1, exact_match: 1, total: 280, incomplete: 0, maxcount: 0}, 102 \ #{current: 1, exact_match: 1, total: 280, incomplete: 0, maxcount: 0},
103 \ searchcount(#{recompute: 1, maxcount: 0})) 103 \ searchcount(#{recompute: 1, maxcount: 0, timeout: 200}))
104 call assert_equal( 104 call assert_equal(
105 \ #{current: 271, exact_match: 1, total: 280, incomplete: 0, maxcount: 0}, 105 \ #{current: 271, exact_match: 1, total: 280, incomplete: 0, maxcount: 0},
106 \ searchcount(#{recompute: 1, maxcount: 0, pos: [line('$')-2, 1, 0]})) 106 \ searchcount(#{recompute: 1, maxcount: 0, pos: [line('$')-2, 1, 0], timeout: 200}))
107 107
108 " Many matches 108 " Many matches
109 call cursor(1, 1) 109 call cursor(1, 1)
110 let g:a = execute(':unsilent :norm! n') 110 let g:a = execute(':unsilent :norm! n')
111 let stat = '\[2/>99\]' 111 let stat = '\[2/>99\]'