Skip to content

Commit

Permalink
patch 8.2.5124: when syntax timeout test fails it does not show the time
Browse files Browse the repository at this point in the history
Problem:    When syntax timeout test fails it does not show the time.
Solution:   Use assert_inrange().
  • Loading branch information
brammool committed Jun 18, 2022
1 parent 156d391 commit 620aa8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/testdir/test_syntax.vim
Expand Up @@ -544,22 +544,20 @@ func Test_syntax_hangs()
syn match Error /\%#=1a*.*X\@<=b*/
redraw
let elapsed = reltimefloat(reltime(start))
call assert_true(elapsed > min_timeout)
call assert_true(elapsed < 1.0)
call assert_inrange(min_timeout, 1.0, elapsed)

" second time syntax HL is disabled
let start = reltime()
redraw
let elapsed = reltimefloat(reltime(start))
call assert_true(elapsed < 0.1)
call assert_inrange(0, 0.1, elapsed)

" after CTRL-L the timeout flag is reset
let start = reltime()
exe "normal \<C-L>"
redraw
let elapsed = reltimefloat(reltime(start))
call assert_true(elapsed > min_timeout)
call assert_true(elapsed < 1.0)
call assert_inrange(min_timeout, 1.0, elapsed)

set redrawtime&
bwipe!
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
5124,
/**/
5123,
/**/
Expand Down

0 comments on commit 620aa8e

Please sign in to comment.