0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.2881: various pieces of code not covered by tests

Problem:    Various pieces of code not covered by tests.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #8245)
This commit is contained in:
Yegappan Lakshmanan
2021-05-24 15:15:47 +02:00
committed by Bram Moolenaar
parent ad5c178a19
commit 611728f806
8 changed files with 49 additions and 2 deletions

View File

@@ -1941,6 +1941,9 @@ def Test_expr7_lambda()
CheckDefAndScriptFailure(["var Ref = (a)=>a + 1"], 'E1004:')
CheckDefAndScriptFailure(["var Ref = (a)=> a + 1"], 'E1004: White space required before and after ''=>'' at "=> a + 1"')
CheckDefAndScriptFailure(["var Ref = (a) =>a + 1"], 'E1004:')
CheckDefAndScriptFailure2(["var Ref = (a) =< a + 1"], 'E1001:', 'E121:')
CheckDefAndScriptFailure(["var Ref = (a: int) => a + 1"], 'E1010:')
CheckDefAndScriptFailure(["var Ref = (a): int => a + 1"], 'E1010:')
CheckDefAndScriptFailure(["filter([1, 2], (k,v) => 1)"], 'E1069:', 1)
# error is in first line of the lambda