summaryrefslogtreecommitdiff
path: root/src/testdir/test_hlsearch.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-06-17 20:55:06 +0200
committerBram Moolenaar <Bram@vim.org>2017-06-17 20:55:06 +0200
commit0946326580e6f034fe2c88d041407ea0fde980ab (patch)
treed3a101a309a7941f2fc6e115ff2c32f17dc7028b /src/testdir/test_hlsearch.vim
parent1ef9bbe215e13a273e74fccaddd8fc5a42c76b6e (diff)
downloadvim-git-0946326580e6f034fe2c88d041407ea0fde980ab.tar.gz
patch 8.0.0646: the hlsearch test fails on fast systemsv8.0.0646
Problem: The hlsearch test fails on fast systems. Solution: Make the search pattern slower. Fix that the old regexp engine doesn't timeout properly.
Diffstat (limited to 'src/testdir/test_hlsearch.vim')
-rw-r--r--src/testdir/test_hlsearch.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/testdir/test_hlsearch.vim b/src/testdir/test_hlsearch.vim
index e9790bb9e..db7a937da 100644
--- a/src/testdir/test_hlsearch.vim
+++ b/src/testdir/test_hlsearch.vim
@@ -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