comparison src/testdir/test_partial.vim @ 17534:2b4c138bf8e9 v8.1.1765

patch 8.1.1765: get(func, dict, def) does not work properly commit https://github.com/vim/vim/commit/f91aac5e3e3b8b1633d84eac2687ebbd76d8133b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 28 13:21:01 2019 +0200 patch 8.1.1765: get(func, dict, def) does not work properly Problem: get(func, dict, def) does not work properly. Solution: Handle NULL dict better. (Takuya Fujiwara, closes https://github.com/vim/vim/issues/4734)
author Bram Moolenaar <Bram@vim.org>
date Sun, 28 Jul 2019 13:30:07 +0200
parents 63b02fcf1361
children 2a017e9dc6da
comparison
equal deleted inserted replaced
17533:5ab1c0b8224d 17534:2b4c138bf8e9
318 318
319 call assert_equal(Func, get(Func, 'func')) 319 call assert_equal(Func, get(Func, 'func'))
320 call assert_equal('MyDictFunc', get(Func, 'name')) 320 call assert_equal('MyDictFunc', get(Func, 'name'))
321 call assert_equal([], get(Func, 'args')) 321 call assert_equal([], get(Func, 'args'))
322 call assert_true(empty( get(Func, 'dict'))) 322 call assert_true(empty( get(Func, 'dict')))
323
324 let P = function('substitute', ['hello there', 'there'])
325 let dict = {'partial has': 'no dict'}
326 call assert_equal(dict, get(P, 'dict', dict))
327 call assert_equal(0, get(l:P, 'dict'))
323 endfunc 328 endfunc
324 329
325 func Test_compare_partials() 330 func Test_compare_partials()
326 let d1 = {} 331 let d1 = {}
327 let d2 = {} 332 let d2 = {}