1
0
forked from aniani/vim

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:
Bram Moolenaar
2019-01-13 15:16:13 +01:00
parent 6e5ea8d2a9
commit c0f5a78c15
10 changed files with 155 additions and 38 deletions

View File

@@ -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