summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-12-28 14:44:10 +0100
committerBram Moolenaar <Bram@vim.org>2015-12-28 14:44:10 +0100
commit4686b323e4bc0f466500b018959f6c8965f010f9 (patch)
tree58b7ed5a992bbd6f0c19bc0ec5bb6e3e502f6dad /src
parent57d7971b5f1621071176eea81cdb0d1fc50c925d (diff)
downloadvim-4686b323e4bc0f466500b018959f6c8965f010f9.zip
patch 7.4.981
Problem: An error in a test script goes unnoticed. Solution: Source the test script inside try/catch. (Hirohito Higashi)
Diffstat (limited to 'src')
-rw-r--r--src/testdir/runtest.vim17
-rw-r--r--src/version.c2
2 files changed, 12 insertions, 7 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 0dc142eb9..cca7c751d 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -21,9 +21,7 @@
" It will be called after each Test_ function.
" Without the +eval feature we can't run these tests, bail out.
-if 0
- quit!
-endif
+so small.vim
" Check that the screen size is at least 24 x 80 characters.
if &lines < 24 || &columns < 80
@@ -38,7 +36,15 @@ endif
" Source the test script. First grab the file name, in case the script
" navigates away.
let testname = expand('%')
-source %
+let done = 0
+let fail = 0
+let errors = []
+try
+ source %
+catch
+ let fail += 1
+ call add(errors, 'Caught exception: ' . v:exception . ' @ ' . v:throwpoint)
+endtry
" Locate Test_ functions and execute them.
redir @q
@@ -46,9 +52,6 @@ function /^Test_
redir END
let tests = split(substitute(@q, 'function \(\k*()\)', '\1', 'g'))
-let done = 0
-let fail = 0
-let errors = []
for test in tests
if exists("*SetUp")
call SetUp()
diff --git a/src/version.c b/src/version.c
index 262876e2b..ac5bb1f22 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 981,
+/**/
980,
/**/
979,