Mercurial > vim
diff src/testdir/test_lambda.vim @ 19932:2c4d9ca33769 v8.2.0522
patch 8.2.0522: several errors are not tested for
Commit: https://github.com/vim/vim/commit/ee4e0c1e9a81cb5d96e0060203a9033c2f28588e
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Apr 6 21:35:05 2020 +0200
patch 8.2.0522: several errors are not tested for
Problem: Several errors are not tested for.
Solution: Add tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5892)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 06 Apr 2020 21:45:31 +0200 |
parents | 293a22b677a8 |
children | 08940efa6b4e |
line wrap: on
line diff
--- a/src/testdir/test_lambda.vim +++ b/src/testdir/test_lambda.vim @@ -311,4 +311,20 @@ func Test_lambda_error() call assert_fails('ec{@{->{d->()()', 'E15') endfunc +func Test_closure_error() + let l =<< trim END + func F1() closure + return 1 + endfunc + END + call writefile(l, 'Xscript') + let caught_932 = 0 + try + source Xscript + catch /E932:/ + let caught_932 = 1 + endtry + call assert_equal(1, caught_932) +endfunc + " vim: shiftwidth=2 sts=2 expandtab