Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
19931:db6b095f4073 | 19932:2c4d9ca33769 |
---|---|
309 func Test_lambda_error() | 309 func Test_lambda_error() |
310 " This was causing a crash | 310 " This was causing a crash |
311 call assert_fails('ec{@{->{d->()()', 'E15') | 311 call assert_fails('ec{@{->{d->()()', 'E15') |
312 endfunc | 312 endfunc |
313 | 313 |
314 func Test_closure_error() | |
315 let l =<< trim END | |
316 func F1() closure | |
317 return 1 | |
318 endfunc | |
319 END | |
320 call writefile(l, 'Xscript') | |
321 let caught_932 = 0 | |
322 try | |
323 source Xscript | |
324 catch /E932:/ | |
325 let caught_932 = 1 | |
326 endtry | |
327 call assert_equal(1, caught_932) | |
328 endfunc | |
329 | |
314 " vim: shiftwidth=2 sts=2 expandtab | 330 " vim: shiftwidth=2 sts=2 expandtab |