]> granicus.if.org Git - vim/commitdiff
patch 8.1.1516: time reported for a test measured wrong v8.1.1516
authorBram Moolenaar <Bram@vim.org>
Mon, 10 Jun 2019 15:43:46 +0000 (17:43 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 10 Jun 2019 15:43:46 +0000 (17:43 +0200)
Problem:    Time reported for a test measured wrong.
Solution:   Move the computation to the end of RunTheTest(). (Ozaki Kiichi,
            closes #4520)

src/testdir/runtest.vim
src/version.c

index f855f6800525ee5b0ca187df655c99a6d9594caf..f81c76df15c2c177263edee2f72bdb18241b56b0 100644 (file)
@@ -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()
index b493377d4da0bc5ca89be079f6491cd82874f88c..c4c8e3fc1c249028ebcfab57f5f48237a105048e 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1516,
 /**/
     1515,
 /**/