Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
24684:1706f44ede8e | 24685:04205b7d67d5 |
---|---|
1939 CheckDefAndScriptSuccess(lines) | 1939 CheckDefAndScriptSuccess(lines) |
1940 | 1940 |
1941 CheckDefAndScriptFailure(["var Ref = (a)=>a + 1"], 'E1004:') | 1941 CheckDefAndScriptFailure(["var Ref = (a)=>a + 1"], 'E1004:') |
1942 CheckDefAndScriptFailure(["var Ref = (a)=> a + 1"], 'E1004: White space required before and after ''=>'' at "=> a + 1"') | 1942 CheckDefAndScriptFailure(["var Ref = (a)=> a + 1"], 'E1004: White space required before and after ''=>'' at "=> a + 1"') |
1943 CheckDefAndScriptFailure(["var Ref = (a) =>a + 1"], 'E1004:') | 1943 CheckDefAndScriptFailure(["var Ref = (a) =>a + 1"], 'E1004:') |
1944 CheckDefAndScriptFailure2(["var Ref = (a) =< a + 1"], 'E1001:', 'E121:') | |
1945 CheckDefAndScriptFailure(["var Ref = (a: int) => a + 1"], 'E1010:') | |
1946 CheckDefAndScriptFailure(["var Ref = (a): int => a + 1"], 'E1010:') | |
1944 | 1947 |
1945 CheckDefAndScriptFailure(["filter([1, 2], (k,v) => 1)"], 'E1069:', 1) | 1948 CheckDefAndScriptFailure(["filter([1, 2], (k,v) => 1)"], 'E1069:', 1) |
1946 # error is in first line of the lambda | 1949 # error is in first line of the lambda |
1947 CheckDefAndScriptFailure(["var L = (a) => a + b"], 'E1001:', 0) | 1950 CheckDefAndScriptFailure(["var L = (a) => a + b"], 'E1001:', 0) |
1948 | 1951 |