aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-09-08 08:47:01 +0800
committerGitHub <noreply@github.com>2022-09-08 08:47:01 +0800
commite93f22f28abe8f774c5e081073cb2eac0f5085fd (patch)
treef5235ef14dce746338bf8fb12a3b0c0d5facb788 /src/nvim/testdir
parentead524656dc1664622f80509a983519a190ca48a (diff)
parent4a67f9d386bb16149eecf32f45a3cb73878f12e7 (diff)
downloadrneovim-e93f22f28abe8f774c5e081073cb2eac0f5085fd.tar.gz
rneovim-e93f22f28abe8f774c5e081073cb2eac0f5085fd.tar.bz2
rneovim-e93f22f28abe8f774c5e081073cb2eac0f5085fd.zip
Merge pull request #20110 from ii14/vim-7c7e1e9b98d4
vim-patch:8.2.3702,9.0.0409
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_listdict.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_listdict.vim b/src/nvim/testdir/test_listdict.vim
index 08c415a069..9cef6905a5 100644
--- a/src/nvim/testdir/test_listdict.vim
+++ b/src/nvim/testdir/test_listdict.vim
@@ -165,6 +165,13 @@ func Test_dict()
call assert_equal({'c': 'ccc', '1': 99, 'b': [1, 2, function('strlen')], '3': 33, '-1': {'a': 1}}, d)
call filter(d, 'v:key =~ ''[ac391]''')
call assert_equal({'c': 'ccc', '1': 99, '3': 33, '-1': {'a': 1}}, d)
+
+ " allow key starting with number at the start, not a curly expression
+ call assert_equal({'1foo': 77}, #{1foo: 77})
+
+ " #{expr} is not a curly expression
+ let x = 'x'
+ call assert_equal(#{g: x}, #{g:x})
endfunc
" Dictionary identity