diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-30 22:14:33 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-30 22:14:33 +0200 |
commit | 4d4d1cd5c8b61ef0296bd6190ca2a0b2d6d96ba7 (patch) | |
tree | 0d7e06a252e1f6ba2b97c86b163b5fc8954b117b /src/testdir | |
parent | f4ee528086dcff2b8744544c440853f177956261 (diff) |
patch 8.2.1328: no space allowed before comma in listv8.2.1328
Problem: No space allowed before comma in list.
Solution: Legacy Vim script allows it. (closes #6577)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_listdict.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_listdict.vim b/src/testdir/test_listdict.vim index beeda2f5bb..563c79f0d3 100644 --- a/src/testdir/test_listdict.vim +++ b/src/testdir/test_listdict.vim @@ -23,6 +23,9 @@ func Test_list_create() call assert_equal(10, x) endfunc +" This was allowed in legacy Vim script +let s:list_with_spaces = [1 , 2 , 3] + " List slices func Test_list_slice() let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},] @@ -202,6 +205,10 @@ func Test_dict() call assert_fails("let d={'k' : i}", 'E121:') endfunc +" This was allowed in legacy Vim script +let s:dict_with_spaces = {'one' : 1 , 'two' : 2 , 'three' : 3} +let s:dict_with_spaces_lit = #{one : 1 , two : 2 , three : 3} + " Dictionary identity func Test_dict_identity() let d = {001: 'asd', 'b': [1, 2, function('strlen')], -1: {'a': 1},} |