diff options
Diffstat (limited to 'src/testdir/runtest.vim')
-rw-r--r-- | src/testdir/runtest.vim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim index ebc692b478..bb0325fe89 100644 --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -173,11 +173,15 @@ function GetAllocId(name) return lnum - top - 1 endfunc +let g:func_start = reltime() + func RunTheTest(test) - echoconsole 'Executing ' . a:test + let prefix = '' if has('reltime') - let func_start = reltime() + let prefix = 'took ' .. reltimestr(reltime(g:func_start)) .. '; now ' + let g:func_start = reltime() endif + echoconsole prefix .. 'Executing ' .. a:test " Avoid stopping at the "hit enter" prompt set nomore @@ -292,7 +296,7 @@ func RunTheTest(test) let message = 'Executed ' . a:test if has('reltime') let message ..= repeat(' ', 50 - len(message)) - let time = reltime(func_start) + let time = reltime(g:func_start) if reltimefloat(time) > 0.1 let message = s:t_bold .. message endif |