summaryrefslogtreecommitdiff
path: root/src/testdir/test_eval_stuff.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-12-23 17:26:11 +0100
committerBram Moolenaar <Bram@vim.org>2017-12-23 17:26:11 +0100
commitfabaf753e26df5a89a854673d14c15a1fa6b321a (patch)
tree511e8530aaaa84f9fc2bb08459f156deb2b528e7 /src/testdir/test_eval_stuff.vim
parent45a0000d5c4a5ea934d5a16a2ab5bbcf307623ac (diff)
downloadvim-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.vim13
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