diff options
Diffstat (limited to 'src/testdir/test_vim9_builtin.vim')
-rw-r--r-- | src/testdir/test_vim9_builtin.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index 3fa5eb3065..9cae4a34e1 100644 --- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -810,6 +810,15 @@ def Test_map_function_arg() assert_equal(['0:a', '1:b', '2:c'], l) END CheckDefAndScriptSuccess(lines) + + lines =<< trim END + range(3)->map((a, b, c) => a + b + c) + END + CheckDefExecAndScriptFailure(lines, 'E1190: One argument too few') + lines =<< trim END + range(3)->map((a, b, c, d) => a + b + c + d) + END + CheckDefExecAndScriptFailure(lines, 'E1190: 2 arguments too few') enddef def Test_map_item_type() |