patch 8.2.1033: not easy to read the test time in the test output

Problem:    Not easy to read the test time in the test output.
Solution:   Align the times.  Make slow tests bold.
This commit is contained in:
Bram Moolenaar
2020-06-21 20:39:37 +02:00
parent 7fe875583b
commit 8d9437968b
2 changed files with 13 additions and 1 deletions

View File

@ -216,7 +216,15 @@ func RunTheTest(test)
let message = 'Executed ' . a:test
if has('reltime')
let message ..= ' in ' .. reltimestr(reltime(func_start)) .. ' seconds'
let message ..= repeat(' ', 50 - len(message))
let time = reltime(func_start)
if has('float') && reltimefloat(time) > 0.1
let message = &t_md .. message
endif
let message ..= ' in ' .. reltimestr(time) .. ' seconds'
if has('float') && reltimefloat(time) > 0.1
let message ..= &t_me
endif
endif
call add(s:messages, message)
let s:done += 1
@ -284,7 +292,9 @@ func FinishTesting()
let message = 'Executed ' . s:done . (s:done > 1 ? ' tests' : ' test')
endif
if s:done > 0 && has('reltime')
let message = &t_md .. message .. repeat(' ', 40 - len(message))
let message ..= ' in ' .. reltimestr(reltime(s:start_time)) .. ' seconds'
let message ..= &t_me
endif
echo message
call add(s:messages, message)

View File

@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1033,
/**/
1032,
/**/