Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/src/testdir/test_partial.vim +++ b/src/testdir/test_partial.vim @@ -320,6 +320,11 @@ func Test_get_partial_items() call assert_equal('MyDictFunc', get(Func, 'name')) call assert_equal([], get(Func, 'args')) call assert_true(empty( get(Func, 'dict'))) + + let P = function('substitute', ['hello there', 'there']) + let dict = {'partial has': 'no dict'} + call assert_equal(dict, get(P, 'dict', dict)) + call assert_equal(0, get(l:P, 'dict')) endfunc func Test_compare_partials()