summaryrefslogtreecommitdiffstats
path: root/src/testdir/shared.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-30 18:24:53 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-30 18:24:53 +0100
commit5feabe00c47fa66d5f4c95213f150488433f78e3 (patch)
tree9e9e980d294d8a3cc5c004f2733538cabef16d86 /src/testdir/shared.vim
parent9f2d020d396132ecbc0be6faa1de29c7078bb5ac (diff)
patch 8.2.0183: tests fail when the float feature is disabledv8.2.0183
Problem: Tests fail when the float feature is disabled. Solution: Skip tests that don't work without float support.
Diffstat (limited to 'src/testdir/shared.vim')
-rw-r--r--src/testdir/shared.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim
index e753c1ebec..58b727187d 100644
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -156,7 +156,7 @@ endfunc
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 @@ func s:WaitForCommon(expr, assert, timeout)
endif
sleep 10m
- if has('reltime')
+ if exists('*reltimefloat')
let slept = float2nr(reltimefloat(reltime(start)) * 1000)
else
let slept += 10
@@ -197,7 +197,7 @@ endfunc
" 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()