patch 8.2.0183: tests fail when the float feature is disabled
Problem: Tests fail when the float feature is disabled.
Solution: Skip tests that don't work without float support.
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim
index e753c1e..58b7271 100644
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -156,7 +156,7 @@
func s:WaitForCommon(expr, assert, timeout)
" using reltime() is more accurate, but not always available
let slept = 0
- if has('reltime')
+ if exists('*reltimefloat')
let start = reltime()
endif
@@ -181,7 +181,7 @@
endif
sleep 10m
- if has('reltime')
+ if exists('*reltimefloat')
let slept = float2nr(reltimefloat(reltime(start)) * 1000)
else
let slept += 10
@@ -197,7 +197,7 @@
" feeds key-input and resumes process. Return time waited in milliseconds.
" Without +timers it uses simply :sleep.
func Standby(msec)
- if has('timers')
+ if has('timers') && exists('*reltimefloat')
let start = reltime()
let g:_standby_timer = timer_start(a:msec, function('s:feedkeys'))
call getchar()