diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-06-22 19:15:24 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-06-22 19:15:24 +0200 |
commit | d6abcd154cdc6a8dd4b7c6ccad37617ea8a1b4aa (patch) | |
tree | 746839083abe888f4424f18c38ac634eec06981b /src/testdir/test_vimscript.vim | |
parent | 663bb2331626944cea156374858131fcd323b9e9 (diff) | |
download | vim-git-d6abcd154cdc6a8dd4b7c6ccad37617ea8a1b4aa.tar.gz |
patch 8.0.0655: not easy to make sure a function does not existv8.0.0655
Problem: Not easy to make sure a function does not exist.
Solution: Add ! as an optional argument to :delfunc.
Diffstat (limited to 'src/testdir/test_vimscript.vim')
-rw-r--r-- | src/testdir/test_vimscript.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim index 6f5a73fb8..c09e2343b 100644 --- a/src/testdir/test_vimscript.vim +++ b/src/testdir/test_vimscript.vim @@ -1390,6 +1390,16 @@ func Test_endfunction_trailing() set verbose=0 endfunc +func Test_delfunction_force() + delfunc! Xtest + delfunc! Xtest + func Xtest() + echo 'nothing' + endfunc + delfunc! Xtest + delfunc! Xtest +endfunc + "------------------------------------------------------------------------------- " Modelines {{{1 " vim: ts=8 sw=4 tw=80 fdm=marker |