# HG changeset patch # User Christian Brabandt # Date 1479402004 -3600 # Node ID 6cdb0226d74ac0d497ca688e80bbf58e15286b5e # Parent 9e362aa41cd2370145a35e9d5ed5a67c58d9f6ba commit https://github.com/vim/vim/commit/cc28e2d05d05552d8b72a520be8a193f3d9822d4 Author: Bram Moolenaar Date: Thu Nov 17 17:56:13 2016 +0100 patch 8.0.0088 Problem: When a test fails in Setup or Teardown the problem is not reported. Solution: Add a try/catch. (Hirohito Higashi) diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 88, +/**/ 87, /**/ 86,