1
0
forked from aniani/vim

patch 9.0.0230: no error for comma missing in list in :def function

Problem:    No error for comma missing in list in :def function.
Solution:   Check for missing comma. (closes #10943)
This commit is contained in:
Bram Moolenaar
2022-08-20 14:51:17 +01:00
parent 62e0e2e54b
commit 2984ed31d9
7 changed files with 26 additions and 15 deletions

View File

@@ -1876,9 +1876,9 @@ def Test_expr7()
if has('float')
v9.CheckDefExecAndScriptFailure([
'g:one = 1.0'
'g:two = 2.0'
'echo g:one % g:two'
'g:one = 1.0',
'g:two = 2.0',
'echo g:one % g:two',
], 'E804', 3)
endif
@@ -2490,6 +2490,7 @@ def Test_expr9_lambda()
v9.CheckDefAndScriptSuccess(['var Fx = (a) => [0,', ' 1]'])
v9.CheckDefAndScriptFailure(['var Fx = (a) => [0', ' 1]'], 'E696:', 2)
v9.CheckDefAndScriptFailure(['var l = [1 2]'], 'E696:', 1)
# no error for existing script variable when checking for lambda
lines =<< trim END