]> granicus.if.org Git - vim/commitdiff
patch 8.0.0088 v8.0.0088
authorBram Moolenaar <Bram@vim.org>
Thu, 17 Nov 2016 16:56:13 +0000 (17:56 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 17 Nov 2016 16:56:13 +0000 (17:56 +0100)
Problem:    When a test fails in Setup or Teardown the problem is not reported.
Solution:   Add a try/catch. (Hirohito Higashi)

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

index c4cb8473245d9221d72588abea08643e302aca2a..3ba3b02648fe27130650a8c0f1e697c552e5eef2 100644 (file)
@@ -89,7 +89,11 @@ endfunc
 function RunTheTest(test)
   echo 'Executing ' . a:test
   if exists("*SetUp")
-    call SetUp()
+    try
+      call SetUp()
+    catch
+      call add(v:errors, 'Caught exception in SetUp() before ' . a:test . ': ' . v:exception . ' @ ' . v:throwpoint)
+    endtry
   endif
 
   call add(s:messages, 'Executing ' . a:test)
@@ -104,7 +108,11 @@ function RunTheTest(test)
   endtry
 
   if exists("*TearDown")
-    call TearDown()
+    try
+      call TearDown()
+    catch
+      call add(v:errors, 'Caught exception in TearDown() after ' . a:test . ': ' . v:exception . ' @ ' . v:throwpoint)
+    endtry
   endif
 
   " Close any extra windows and make the current one not modified.
@@ -221,3 +229,5 @@ call append(line('$'), s:messages)
 write
 
 qall!
+
+" vim: shiftwidth=2 sts=2 expandtab
index 074c7ebc76ab03f5f00de85f5c404d1be461d370..ada385c822ffd9bbc94f47b4357a952f57dd9a9f 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    88,
 /**/
     87,
 /**/