mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
vim-patch:partial:8.2.1328: no space allowed before comma in list
Problem: No space allowed before comma in list.
Solution: Legacy Vim script allows it. (closes vim/vim#6577)
4d4d1cd5c8
Partial port to guard against v8.2.1326 regression.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -26,6 +26,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},]
|
||||
@@ -340,6 +343,10 @@ func Test_dict()
|
||||
call assert_equal(#{g: x}, #{g:x})
|
||||
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 lines =<< trim END
|
||||
|
||||
Reference in New Issue
Block a user