diff src/testdir/shared.vim @ 19249:2a017e9dc6da v8.2.0183

patch 8.2.0183: tests fail when the float feature is disabled Commit: https://github.com/vim/vim/commit/5feabe00c47fa66d5f4c95213f150488433f78e3 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 30 18:24:53 2020 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 30 Jan 2020 18:30:04 +0100
parents eff8d8f72a82
children 031184ace7c5
line wrap: on
line diff
--- 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, timeo
     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()