mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
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)
This commit is contained in:
@@ -89,7 +89,11 @@ endfunc
|
|||||||
function RunTheTest(test)
|
function RunTheTest(test)
|
||||||
echo 'Executing ' . a:test
|
echo 'Executing ' . a:test
|
||||||
if exists("*SetUp")
|
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
|
endif
|
||||||
|
|
||||||
call add(s:messages, 'Executing ' . a:test)
|
call add(s:messages, 'Executing ' . a:test)
|
||||||
@@ -104,7 +108,11 @@ function RunTheTest(test)
|
|||||||
endtry
|
endtry
|
||||||
|
|
||||||
if exists("*TearDown")
|
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
|
endif
|
||||||
|
|
||||||
" Close any extra windows and make the current one not modified.
|
" Close any extra windows and make the current one not modified.
|
||||||
@@ -221,3 +229,5 @@ call append(line('$'), s:messages)
|
|||||||
write
|
write
|
||||||
|
|
||||||
qall!
|
qall!
|
||||||
|
|
||||||
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
88,
|
||||||
/**/
|
/**/
|
||||||
87,
|
87,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user