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 #2483)
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index 932f2c4..050882c 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -94,6 +94,7 @@
test_edit.res \
test_erasebackword.res \
test_escaped_glob.res \
+ test_eval_stuff.res \
test_exec_while_if.res \
test_exists.res \
test_exists_autocmd.res \
diff --git a/src/testdir/test_eval.in b/src/testdir/test_eval.in
index 84f26ba..3b61442 100644
--- a/src/testdir/test_eval.in
+++ b/src/testdir/test_eval.in
@@ -1,5 +1,7 @@
Test for various eval features. vim: set ft=vim :
+NOTE: Do not add more here, use new style test test_eval_stuff.vim
+
Note: system clipboard is saved, changed and restored.
clipboard contents
@@ -134,10 +136,10 @@
let _clipreg = ['*', getreg('*'), getregtype('*')]
let _clipopt = &cb
let &cb='unnamed'
-5y
+7y
AR *
tabdo :windo :echo "hi"
-6y
+8y
AR *
let &cb=_clipopt
call call('setreg', _clipreg)
diff --git a/src/testdir/test_eval_stuff.vim b/src/testdir/test_eval_stuff.vim
new file mode 100644
index 0000000..92e1ec5
--- /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