1
0
forked from aniani/vim

patch 8.0.0646: the hlsearch test fails on fast systems

Problem:    The hlsearch test fails on fast systems.
Solution:   Make the search pattern slower.  Fix that the old regexp engine
            doesn't timeout properly.
This commit is contained in:
Bram Moolenaar
2017-06-17 20:55:06 +02:00
parent 1ef9bbe215
commit 0946326580
3 changed files with 37 additions and 11 deletions

View File

@@ -39,7 +39,8 @@ func Test_hlsearch_hangs()
endif
" This pattern takes a long time to match, it should timeout.
help
new
call setline(1, ['aaa', repeat('abc ', 1000), 'ccc'])
let start = reltime()
set hlsearch nolazyredraw redrawtime=101
let @/ = '\%#=1a*.*X\@<=b*'
@@ -48,5 +49,5 @@ func Test_hlsearch_hangs()
call assert_true(elapsed > 0.1)
call assert_true(elapsed < 1.0)
set nohlsearch redrawtime&
quit
bwipe!
endfunc