forked from aniani/vim
patch 7.4.1839
Problem: Cannot get the items stored in a partial. Solution: Support using get() on a partial.
This commit is contained in:
@@ -279,3 +279,12 @@ func Test_auto_partial_rebind()
|
||||
call assert_equal('dict1', dict2.f2())
|
||||
call assert_equal('dict1', dict2['f2']())
|
||||
endfunc
|
||||
|
||||
func Test_get_partial_items()
|
||||
let dict = {'name': 'hello'}
|
||||
let Cb = function('MyDictFunc', ["foo", "bar"], dict)
|
||||
call assert_equal('MyDictFunc', get(Cb, 'func'))
|
||||
call assert_equal(["foo", "bar"], get(Cb, 'args'))
|
||||
call assert_equal(dict, get(Cb, 'dict'))
|
||||
call assert_fails('call get(Cb, "xxx")', 'E475:')
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user