diff options
author | watiko <service@mail.watiko.net> | 2016-01-11 05:31:33 +0900 |
---|---|---|
committer | watiko <service@mail.watiko.net> | 2016-01-15 23:50:04 +0900 |
commit | 9d184927931a44784136cce58ece63ef9f7bec32 (patch) | |
tree | 9ab270d2c550a7124614ab9625f1ffcc3104b2a5 | |
parent | 1231f0b0015cdcdf344eb815743c4c0dc89ba9ec (diff) | |
download | rneovim-9d184927931a44784136cce58ece63ef9f7bec32.tar.gz rneovim-9d184927931a44784136cce58ece63ef9f7bec32.tar.bz2 rneovim-9d184927931a44784136cce58ece63ef9f7bec32.zip |
vim-patch:7.4.981
Problem: An error in a test script goes unnoticed.
Solution: Source the test script inside try/catch. (Hirohito Higashi)
https://github.com/vim/vim/commit/4686b323e4bc0f466500b018959f6c8965f010f9
-rw-r--r-- | src/nvim/testdir/runtest.vim | 17 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 0dc142eb97..cca7c751df 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/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/nvim/version.c b/src/nvim/version.c index e057d884f5..406edbfa3c 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -143,7 +143,7 @@ static int included_patches[] = { // 984, // 983, // 982 NA - // 981, + 981, 980, // 979 NA 978, |