]> granicus.if.org Git - vim/commitdiff
patch 8.2.5124: when syntax timeout test fails it does not show the time v8.2.5124
authorBram Moolenaar <Bram@vim.org>
Sat, 18 Jun 2022 15:05:32 +0000 (16:05 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 18 Jun 2022 15:05:32 +0000 (16:05 +0100)
Problem:    When syntax timeout test fails it does not show the time.
Solution:   Use assert_inrange().

src/testdir/test_syntax.vim
src/version.c

index 82d5cbb0bc9ea27902f891cad5db8604980684b6..589470b684d6bc285f85179ab1837836961d5772 100644 (file)
@@ -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!
index 0a422742f1ad216f5a286b13728c201144252455..66dba1757f7417f72530f079f098cc2687091313 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    5124,
 /**/
     5123,
 /**/