comparison src/testdir/test_hlsearch.vim @ 21765:08940efa6b4e v8.2.1432

patch 8.2.1432: various inconsistencies in test files Commit: https://github.com/vim/vim/commit/6d91bcb4d23b5c6a0be72c384beaf385e2d9d606 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 12 18:50:36 2020 +0200 patch 8.2.1432: various inconsistencies in test files Problem: Various inconsistencies in test files. Solution: Add modelines where they were missing. Use Check commands instead of silently skipping over tests. Adjust indents and comments. (Ken Takata, closes #6695)
author Bram Moolenaar <Bram@vim.org>
date Wed, 12 Aug 2020 19:00:08 +0200
parents 63b02fcf1361
children ff21e2962490
comparison
equal deleted inserted replaced
21764:476b6faad407 21765:08940efa6b4e
1 " Test for v:hlsearch 1 " Test for v:hlsearch
2
3 source check.vim
2 4
3 func Test_hlsearch() 5 func Test_hlsearch()
4 new 6 new
5 call setline(1, repeat(['aaa'], 10)) 7 call setline(1, repeat(['aaa'], 10))
6 set hlsearch nolazyredraw 8 set hlsearch nolazyredraw
31 call getchar(1) 33 call getchar(1)
32 enew! 34 enew!
33 endfunc 35 endfunc
34 36
35 func Test_hlsearch_hangs() 37 func Test_hlsearch_hangs()
36 if !has('reltime') || !has('float') 38 CheckFunction reltimefloat
37 return
38 endif
39 39
40 " This pattern takes a long time to match, it should timeout. 40 " This pattern takes a long time to match, it should timeout.
41 new 41 new
42 call setline(1, ['aaa', repeat('abc ', 1000), 'ccc']) 42 call setline(1, ['aaa', repeat('abc ', 1000), 'ccc'])
43 let start = reltime() 43 let start = reltime()
61 call assert_equal(attr, screenattr(row, 1), 'in line ' . row) 61 call assert_equal(attr, screenattr(row, 1), 'in line ' . row)
62 endfor 62 endfor
63 set nohlsearch 63 set nohlsearch
64 bwipe! 64 bwipe!
65 endfunc 65 endfunc
66
67 " vim: shiftwidth=2 sts=2 expandtab