From 3fac3cad75aa41352d5ec35d7c68ed127ff2f970 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 23 Aug 2020 13:22:07 -0400 Subject: vim-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 vim/vim#4520) https://github.com/vim/vim/commit/640d4f0c97e686211dc4474b46a83e4435d883c0 --- src/nvim/testdir/runtest.vim | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 2bf61b0719..67646cce14 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -136,13 +136,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. @@ -196,6 +189,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() -- cgit