Mercurial > vim
changeset 29210:947c8434894a v8.2.5124
patch 8.2.5124: when syntax timeout test fails it does not show the time
Commit: https://github.com/vim/vim/commit/620aa8eb5b1468d086253f8aa787a33a86033100
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 18 16:05:32 2022 +0100
patch 8.2.5124: when syntax timeout test fails it does not show the time
Problem: When syntax timeout test fails it does not show the time.
Solution: Use assert_inrange().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 18 Jun 2022 17:15:02 +0200 |
parents | 25100ad32a0d |
children | b9756901f610 |
files | src/testdir/test_syntax.vim src/version.c |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_syntax.vim +++ b/src/testdir/test_syntax.vim @@ -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!