diff options
| author | Michael Ennen <mike.ennen@gmail.com> | 2016-10-26 12:42:15 -0700 |
|---|---|---|
| committer | James McCoy <jamessan@jamessan.com> | 2016-12-12 10:17:35 -0500 |
| commit | 5cf0c99755581f789973a4fa4bb3d95a61a01341 (patch) | |
| tree | d3d8f12f9a354333dbdd0568820fe95848c16602 /src/nvim/testdir/test_partial.vim | |
| parent | 2c1b4c7f3c13b61dab70d6ad3507b90c7a60e4aa (diff) | |
| download | rneovim-5cf0c99755581f789973a4fa4bb3d95a61a01341.tar.gz rneovim-5cf0c99755581f789973a4fa4bb3d95a61a01341.tar.bz2 rneovim-5cf0c99755581f789973a4fa4bb3d95a61a01341.zip | |
vim-patch:7.4.1581
Problem: Using ":call dict.func()" where the function is a partial does
not work. Using "dict.func()" where the function does not take a
Dictionary does not work.
Solution: Handle partial properly in ":call". (Yasuhiro Matsumoto)
https://github.com/vim/vim/commit/65639032bb7b17996cd255d1508a1df4ad528a1f
Diffstat (limited to 'src/nvim/testdir/test_partial.vim')
| -rw-r--r-- | src/nvim/testdir/test_partial.vim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_partial.vim b/src/nvim/testdir/test_partial.vim index f6f6b87a29..cb853f9335 100644 --- a/src/nvim/testdir/test_partial.vim +++ b/src/nvim/testdir/test_partial.vim @@ -16,6 +16,8 @@ endfunc func Test_partial_args() let Cb = function('MyFunc', ["foo", "bar"]) + + call Cb("zzz") call assert_equal("foo/bar/xxx", Cb("xxx")) call assert_equal("foo/bar/yyy", call(Cb, ["yyy"])) @@ -48,6 +50,9 @@ func Test_partial_dict() let Cb = function('MyDictFunc', dict) call assert_equal("hello/xxx/yyy", Cb("xxx", "yyy")) call assert_fails('Cb("fff")', 'E492:') + + let dict = {"tr": function('tr', ['hello', 'h', 'H'])} + call assert_equal("Hello", dict.tr()) endfunc func Test_partial_implicit() |