Mercurial > vim
changeset 17032:84f308b126de v8.1.1516
patch 8.1.1516: time reported for a test measured wrong
commit https://github.com/vim/vim/commit/640d4f0c97e686211dc4474b46a83e4435d883c0
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 10 17:43:46 2019 +0200
patch 8.1.1516: time reported for a test measured wrong
Problem: Time reported for a test measured wrong.
Solution: Move the computation to the end of RunTheTest(). (Ozaki Kiichi,
closes #4520)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 10 Jun 2019 17:45:06 +0200 |
parents | c3ca9d6be49a |
children | 1390ba5ee83c |
files | src/testdir/runtest.vim src/version.c |
diffstat | 2 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -133,13 +133,6 @@ func RunTheTest(test) endtry endif - let message = 'Executed ' . a:test - if has('reltime') - let message ..= ' in ' .. reltimestr(reltime(func_start)) .. ' seconds' - endif - call add(s:messages, message) - let s:done += 1 - if a:test =~ 'Test_nocatch_' " Function handles errors itself. This avoids skipping commands after the " error. @@ -193,6 +186,13 @@ func RunTheTest(test) endwhile exe 'cd ' . save_cwd + + let message = 'Executed ' . a:test + if has('reltime') + let message ..= ' in ' .. reltimestr(reltime(func_start)) .. ' seconds' + endif + call add(s:messages, message) + let s:done += 1 endfunc func AfterTheTest()