diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-19 20:05:45 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-19 20:05:45 +0100 |
commit | 5c29154b521e9948190be653cfda666ecbb63b5b (patch) | |
tree | e843a392c353d941b91e2fdb325d642ea5a1bb5f /src/testdir/test_partial.vim | |
parent | f0e86a0dbddc18568910e9e4aaae0cd88ca8087a (diff) | |
download | vim-git-5c29154b521e9948190be653cfda666ecbb63b5b.tar.gz |
patch 7.4.1608v7.4.1608
Problem: string() doesn't handle a partial.
Solution: Make a string from a partial.
Diffstat (limited to 'src/testdir/test_partial.vim')
-rw-r--r-- | src/testdir/test_partial.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_partial.vim b/src/testdir/test_partial.vim index fa07866a1..3764f221f 100644 --- a/src/testdir/test_partial.vim +++ b/src/testdir/test_partial.vim @@ -156,3 +156,17 @@ func Test_partial_exists() let lF = [F] call assert_true(exists('*lF[0]')) endfunc + +func Test_partial_string() + let F = function('MyFunc') + call assert_equal("function('MyFunc')", string(F)) + let F = function('MyFunc', ['foo']) + call assert_equal("function('MyFunc', ['foo'])", string(F)) + let F = function('MyFunc', ['foo', 'bar']) + call assert_equal("function('MyFunc', ['foo', 'bar'])", string(F)) + let d = {'one': 1} + let F = function('MyFunc', d) + call assert_equal("function('MyFunc', {'one': 1})", string(F)) + let F = function('MyFunc', ['foo'], d) + call assert_equal("function('MyFunc', ['foo'], {'one': 1})", string(F)) +endfunc |