diff src/testdir/test_eval_stuff.vim @ 13096:30f9a62f5f51 v8.0.1423

patch 8.0.1423: error in return not caught by try/catch commit https://github.com/vim/vim/commit/fabaf753e26df5a89a854673d14c15a1fa6b321a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 23 17:26:11 2017 +0100 patch 8.0.1423: error in return not caught by try/catch Problem: Error in return not caught by try/catch. Solution: Call update_force_abort(). (Yasuhiro Matsomoto, closes https://github.com/vim/vim/issues/2483)
author Christian Brabandt <cb@256bit.org>
date Sat, 23 Dec 2017 17:30:05 +0100
parents
children 530943a23d3f
line wrap: on
line diff
new file mode 100644
--- /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