summaryrefslogtreecommitdiff
path: root/src/testdir/test_partial.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-17 21:11:53 +0100
committerBram Moolenaar <Bram@vim.org>2016-03-17 21:11:53 +0100
commit8a1bb046378f4bc68d6a04af2eab80fb3ce04da6 (patch)
treeeb65f3b2a78eb939f72723aa1931349a1073ad18 /src/testdir/test_partial.vim
parentd22a18928ebcb465393da1418bb88204b97badb1 (diff)
downloadvim-git-8a1bb046378f4bc68d6a04af2eab80fb3ce04da6.tar.gz
patch 7.4.1586v7.4.1586
Problem: Nesting partials doesn't work. Solution: Append arguments. (Ken Takata)
Diffstat (limited to 'src/testdir/test_partial.vim')
-rw-r--r--src/testdir/test_partial.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/test_partial.vim b/src/testdir/test_partial.vim
index 21ad7376f..71d1837ca 100644
--- a/src/testdir/test_partial.vim
+++ b/src/testdir/test_partial.vim
@@ -20,9 +20,17 @@ func Test_partial_args()
call Cb("zzz")
call assert_equal("foo/bar/xxx", Cb("xxx"))
call assert_equal("foo/bar/yyy", call(Cb, ["yyy"]))
+ let Cb2 = function(Cb)
+ call assert_equal("foo/bar/zzz", Cb2("zzz"))
+ let Cb3 = function(Cb, ["www"])
+ call assert_equal("foo/bar/www", Cb3())
let Cb = function('MyFunc', [])
call assert_equal("a/b/c", Cb("a", "b", "c"))
+ let Cb2 = function(Cb, [])
+ call assert_equal("a/b/d", Cb2("a", "b", "d"))
+ let Cb3 = function(Cb, ["a", "b"])
+ call assert_equal("a/b/e", Cb3("e"))
let Sort = function('MySort', [1])
call assert_equal([1, 2, 3], sort([3, 1, 2], Sort))