diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-12-23 17:26:11 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-12-23 17:26:11 +0100 |
commit | fabaf753e26df5a89a854673d14c15a1fa6b321a (patch) | |
tree | 511e8530aaaa84f9fc2bb08459f156deb2b528e7 /src/testdir/test_eval_stuff.vim | |
parent | 45a0000d5c4a5ea934d5a16a2ab5bbcf307623ac (diff) | |
download | vim-git-fabaf753e26df5a89a854673d14c15a1fa6b321a.tar.gz |
patch 8.0.1423: error in return not caught by try/catchv8.0.1423
Problem: Error in return not caught by try/catch.
Solution: Call update_force_abort(). (Yasuhiro Matsomoto, closes #2483)
Diffstat (limited to 'src/testdir/test_eval_stuff.vim')
-rw-r--r-- | src/testdir/test_eval_stuff.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_eval_stuff.vim b/src/testdir/test_eval_stuff.vim new file mode 100644 index 000000000..92e1ec533 --- /dev/null +++ b/src/testdir/test_eval_stuff.vim @@ -0,0 +1,13 @@ +" Tests for various eval things. + +function s:foo() abort + try + return [] == 0 + catch + return 1 + endtry +endfunction + +func Test_catch_return_with_error() + call assert_equal(1, s:foo()) +endfunc |