patch 8.2.5127: using assert_true() does not show value on failure
Problem: Using assert_true() does not show value on failure.
Solution: Use assert_inrange(). (closes #10593)
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index e156fa6..db8e367 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -528,7 +528,7 @@
call ch_close(handle)
else
let elapsed = reltime(start)
- call assert_true(reltimefloat(elapsed) < 1.0)
+ call assert_inrange(0.0, 1.0, reltimefloat(elapsed))
endif
" We intend to use a socket that doesn't exist and wait for half a second
@@ -1634,8 +1634,7 @@
let g:exit_cb_val.process = job_info(job).process
call WaitFor('type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0')
let elapsed = reltimefloat(g:exit_cb_val.end)
- call assert_true(elapsed > 0.5)
- call assert_true(elapsed < 1.0)
+ call assert_inrange(0.5, 1.0, elapsed)
" case: unreferenced job, using timer
if !has('timers')
diff --git a/src/testdir/test_hlsearch.vim b/src/testdir/test_hlsearch.vim
index 8325841..ed50145 100644
--- a/src/testdir/test_hlsearch.vim
+++ b/src/testdir/test_hlsearch.vim
@@ -54,8 +54,7 @@
let @/ = '\%#=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)
set nohlsearch redrawtime&
bwipe!
endfunc
diff --git a/src/version.c b/src/version.c
index 2f397ae..39bbd4d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 5127,
+/**/
5126,
/**/
5125,