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.
diff --git a/src/testdir/test_hlsearch.vim b/src/testdir/test_hlsearch.vim
index e9790bb..db7a937 100644
--- a/src/testdir/test_hlsearch.vim
+++ b/src/testdir/test_hlsearch.vim
@@ -39,7 +39,8 @@
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 @@
call assert_true(elapsed > 0.1)
call assert_true(elapsed < 1.0)
set nohlsearch redrawtime&
- quit
+ bwipe!
endfunc