comparison src/testdir/test_listdict.vim @ 17413:40417757dffd v8.1.1705

patch 8.1.1705: using ~{} for a literal dict is not nice commit https://github.com/vim/vim/commit/4c6d90458baae843463f930fdc3fe4a7a2191d27 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 16 22:04:02 2019 +0200 patch 8.1.1705: using ~{} for a literal dict is not nice Problem: Using ~{} for a literal dict is not nice. Solution: Use #{} instead.
author Bram Moolenaar <Bram@vim.org>
date Tue, 16 Jul 2019 22:15:05 +0200
parents 2558f90045e5
children af3d441845cd
comparison
equal deleted inserted replaced
17412:6ab542e33829 17413:40417757dffd
279 let expected = 'a:' . string(get(d, 'func')) 279 let expected = 'a:' . string(get(d, 'func'))
280 call assert_equal(expected, d.func(string(remove(d, 'func')))) 280 call assert_equal(expected, d.func(string(remove(d, 'func'))))
281 endfunc 281 endfunc
282 282
283 func Test_dict_literal_keys() 283 func Test_dict_literal_keys()
284 call assert_equal({'one': 1, 'two2': 2, '3three': 3, '44': 4}, ~{one: 1, two2: 2, 3three: 3, 44: 4},) 284 call assert_equal({'one': 1, 'two2': 2, '3three': 3, '44': 4}, #{one: 1, two2: 2, 3three: 3, 44: 4},)
285 285
286 " why *{} cannot be used 286 " why *{} cannot be used
287 let blue = 'blue' 287 let blue = 'blue'
288 call assert_equal('6', trim(execute('echo 2 *{blue: 3}.blue'))) 288 call assert_equal('6', trim(execute('echo 2 *{blue: 3}.blue')))
289 endfunc 289 endfunc