Lines Matching refs:get
1 " Tests for getwinvar(), gettabvar(), gettabwinvar() and get().
108 " Test get() function using default value.
110 " get({dict}, {key} [, {default}])
113 call assert_equal(42, get(d, 'foo', 99))
114 call assert_equal(999, get(d, 'bar', 999))
117 " get({list}, {idx} [, {default}])
120 call assert_equal(1, get(l, 0, 999))
121 call assert_equal(3, get(l, -1, 999))
122 call assert_equal(999, get(l, 3, 999))
125 " get({blob}, {idx} [, {default}]) - in test_blob.vim
127 " get({lambda}, {what} [, {default}])
130 call assert_match('^<lambda>', get(l:L, 'name'))
131 call assert_equal(l:L, get(l:L, 'func'))
132 call assert_equal({'lambda has': 'no dict'}, get(l:L, 'dict', {'lambda has': 'no dict'}))
133 call assert_equal(0, get(l:L, 'dict'))
134 call assert_equal([], get(l:L, 'args'))
137 " get({func}, {what} [, {default}])
140 call assert_equal('tr', get(l:F, 'name'))
141 call assert_equal(l:F, get(l:F, 'func'))
142 call assert_equal({'func has': 'no dict'}, get(l:F, 'dict', {'func has': 'no dict'}))
143 call assert_equal(0, get(l:F, 'dict'))
144 call assert_equal([], get(l:F, 'args'))
146 call assert_equal('', get(NF, 'name'))
147 call assert_equal(NF, get(NF, 'func'))
148 call assert_equal(0, get(NF, 'dict'))
149 call assert_equal([], get(NF, 'args'))
152 " get({partial}, {what} [, {default}]) - in test_partial.vim