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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user