summaryrefslogtreecommitdiff
path: root/src/testdir/test_partial.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_partial.vim')
-rw-r--r--src/testdir/test_partial.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/test_partial.vim b/src/testdir/test_partial.vim
index 3764f221f..f67bb41dd 100644
--- a/src/testdir/test_partial.vim
+++ b/src/testdir/test_partial.vim
@@ -170,3 +170,13 @@ func Test_partial_string()
let F = function('MyFunc', ['foo'], d)
call assert_equal("function('MyFunc', ['foo'], {'one': 1})", string(F))
endfunc
+
+func Test_func_unref()
+ let obj = {}
+ function! obj.func() abort
+ endfunction
+ let funcnumber = matchstr(string(obj.func), '^function(''\zs.\{-}\ze''')
+ call assert_true(exists('*{' . funcnumber . '}'))
+ unlet obj
+ call assert_false(exists('*{' . funcnumber . '}'))
+endfunc