mirror of
https://github.com/vim/vim.git
synced 2025-10-06 05:44:14 -04:00
patch 8.1.0736: code for Blob not sufficiently tested
Problem: Code for Blob not sufficiently tested. Solution: Add more tests. Fix uncovered crash. Add test_null_blob().
This commit is contained in:
@@ -49,7 +49,7 @@ endfunc
|
||||
|
||||
function Test_lambda_fails()
|
||||
call assert_equal(3, {a, b -> a + b}(1, 2))
|
||||
call assert_fails('echo {a, a -> a + a}(1, 2)', 'E15:')
|
||||
call assert_fails('echo {a, a -> a + a}(1, 2)', 'E853:')
|
||||
call assert_fails('echo {a, b -> a + b)}(1, 2)', 'E15:')
|
||||
endfunc
|
||||
|
||||
@@ -169,7 +169,7 @@ func Test_lambda_scope()
|
||||
let l:D = s:NewCounter2()
|
||||
|
||||
call assert_equal(1, l:C())
|
||||
call assert_fails(':call l:D()', 'E15:') " E121: then E15:
|
||||
call assert_fails(':call l:D()', 'E121:')
|
||||
call assert_equal(2, l:C())
|
||||
endfunc
|
||||
|
||||
|
Reference in New Issue
Block a user