aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-07 00:45:05 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-07 00:56:38 -0400
commit20fc7ef161f3c40b957ba81a751af4639cce7776 (patch)
treef6297b64b8ce9c3d6f51ec71caf8592e848ca173 /src/nvim/testdir
parentd109a331446a998671bf54655df99238e2f1b093 (diff)
downloadrneovim-20fc7ef161f3c40b957ba81a751af4639cce7776.tar.gz
rneovim-20fc7ef161f3c40b957ba81a751af4639cce7776.tar.bz2
rneovim-20fc7ef161f3c40b957ba81a751af4639cce7776.zip
vim-patch:8.1.1692: using *{} for literal dict is not backwards compatible
Problem: Using *{} for literal dict is not backwards compatible. (Yasuhiro Matsumoto) Solution: Use ~{} instead. https://github.com/vim/vim/commit/b8be54dcc517c9d57b62409945b7d4b90b6c3071
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_listdict.vim7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_listdict.vim b/src/nvim/testdir/test_listdict.vim
index 95f1d264ea..28cbceef9a 100644
--- a/src/nvim/testdir/test_listdict.vim
+++ b/src/nvim/testdir/test_listdict.vim
@@ -281,8 +281,11 @@ func Test_dict_func_remove_in_use()
endfunc
func Test_dict_literal_keys()
- call assert_equal({'one': 1, 'two2': 2, '3three': 3, '44': 4}, *{one: 1, two2: 2, 3three: 3, 44: 4},)
- call assert_equal('2 3', trim(execute('echo 2 *{blue: 3}.blue')))
+ call assert_equal({'one': 1, 'two2': 2, '3three': 3, '44': 4}, ~{one: 1, two2: 2, 3three: 3, 44: 4},)
+
+ " why *{} cannot be used
+ let blue = 'blue'
+ call assert_equal('6', trim(execute('echo 2 *{blue: 3}.blue')))
endfunc
" Nasty: deepcopy() dict that refers to itself (fails when noref used)