diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-21 20:39:37 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-21 20:39:37 +0200 |
commit | 8d9437968b6693ecb14e7375bcb242e657e75266 (patch) | |
tree | ada418b279644206a446f411a522be60ec4d36d5 /src | |
parent | 7fe875583bb474d03d281ca59af3320e7e176953 (diff) |
patch 8.2.1033: not easy to read the test time in the test outputv8.2.1033
Problem: Not easy to read the test time in the test output.
Solution: Align the times. Make slow tests bold.
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/runtest.vim | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim index b1e05288b1..fdf99ce1af 100644 --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -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) diff --git a/src/version.c b/src/version.c index 5463b44c00..283c0c9899 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1033, +/**/ 1032, /**/ 1031, |