mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04:00
patch 8.2.0522: several errors are not tested for
Problem: Several errors are not tested for. Solution: Add tests. (Yegappan Lakshmanan, closes #5892)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user