Skip to content

Commit cc28e2d

Browse files
committed
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)
1 parent 7df915d commit cc28e2d

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/testdir/runtest.vim

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ endfunc
8989
function RunTheTest(test)
9090
echo 'Executing ' . a:test
9191
if exists("*SetUp")
92-
call SetUp()
92+
try
93+
call SetUp()
94+
catch
95+
call add(v:errors, 'Caught exception in SetUp() before ' . a:test . ': ' . v:exception . ' @ ' . v:throwpoint)
96+
endtry
9397
endif
9498

9599
call add(s:messages, 'Executing ' . a:test)
@@ -104,7 +108,11 @@ function RunTheTest(test)
104108
endtry
105109

106110
if exists("*TearDown")
107-
call TearDown()
111+
try
112+
call TearDown()
113+
catch
114+
call add(v:errors, 'Caught exception in TearDown() after ' . a:test . ': ' . v:exception . ' @ ' . v:throwpoint)
115+
endtry
108116
endif
109117

110118
" Close any extra windows and make the current one not modified.
@@ -221,3 +229,5 @@ call append(line('$'), s:messages)
221229
write
222230

223231
qall!
232+
233+
" vim: shiftwidth=2 sts=2 expandtab

src/version.c

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

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
88,
767769
/**/
768770
87,
769771
/**/

0 commit comments

Comments
 (0)