Skip to content

Commit 640d4f0

Browse files
committed
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)
1 parent 82febc1 commit 640d4f0

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/testdir/runtest.vim

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,6 @@ func RunTheTest(test)
133133
endtry
134134
endif
135135

136-
let message = 'Executed ' . a:test
137-
if has('reltime')
138-
let message ..= ' in ' .. reltimestr(reltime(func_start)) .. ' seconds'
139-
endif
140-
call add(s:messages, message)
141-
let s:done += 1
142-
143136
if a:test =~ 'Test_nocatch_'
144137
" Function handles errors itself. This avoids skipping commands after the
145138
" error.
@@ -193,6 +186,13 @@ func RunTheTest(test)
193186
endwhile
194187

195188
exe 'cd ' . save_cwd
189+
190+
let message = 'Executed ' . a:test
191+
if has('reltime')
192+
let message ..= ' in ' .. reltimestr(reltime(func_start)) .. ' seconds'
193+
endif
194+
call add(s:messages, message)
195+
let s:done += 1
196196
endfunc
197197

198198
func AfterTheTest()

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,8 @@ static char *(features[]) =
777777

778778
static int included_patches[] =
779779
{ /* Add new patch number below this line */
780+
/**/
781+
1516,
780782
/**/
781783
1515,
782784
/**/

0 commit comments

Comments
 (0)