Mercurial > vim
diff src/testdir/test_vim9_expr.vim @ 24685:04205b7d67d5 v8.2.2881
patch 8.2.2881: various pieces of code not covered by tests
Commit: https://github.com/vim/vim/commit/611728f80604dd56960e8c197e5749d203c8feb1
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Mon May 24 15:15:47 2021 +0200
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 https://github.com/vim/vim/issues/8245)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 24 May 2021 15:30:03 +0200 |
parents | 668df21d8bc6 |
children | 13efbfc53054 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -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