comparison src/testdir/test_vimscript.vim @ 11545:1780e6fecb30 v8.0.0655

patch 8.0.0655: not easy to make sure a function does not exist commit https://github.com/vim/vim/commit/d6abcd154cdc6a8dd4b7c6ccad37617ea8a1b4aa Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 22 19:15:24 2017 +0200 patch 8.0.0655: not easy to make sure a function does not exist Problem: Not easy to make sure a function does not exist. Solution: Add ! as an optional argument to :delfunc.
author Christian Brabandt <cb@256bit.org>
date Thu, 22 Jun 2017 19:30:04 +0200
parents 57c452316da1
children 3d03ed329a54
comparison
equal deleted inserted replaced
11544:c5f791fb7861 11545:1780e6fecb30
1388 call assert_true(exists('*Xtest')) 1388 call assert_true(exists('*Xtest'))
1389 delfunc Xtest 1389 delfunc Xtest
1390 set verbose=0 1390 set verbose=0
1391 endfunc 1391 endfunc
1392 1392
1393 func Test_delfunction_force()
1394 delfunc! Xtest
1395 delfunc! Xtest
1396 func Xtest()
1397 echo 'nothing'
1398 endfunc
1399 delfunc! Xtest
1400 delfunc! Xtest
1401 endfunc
1402
1393 "------------------------------------------------------------------------------- 1403 "-------------------------------------------------------------------------------
1394 " Modelines {{{1 1404 " Modelines {{{1
1395 " vim: ts=8 sw=4 tw=80 fdm=marker 1405 " vim: ts=8 sw=4 tw=80 fdm=marker
1396 " vim: fdt=substitute(substitute(foldtext(),\ '\\%(^+--\\)\\@<=\\(\\s*\\)\\(.\\{-}\\)\:\ \\%(\"\ \\)\\=\\(Test\ \\d*\\)\:\\s*',\ '\\3\ (\\2)\:\ \\1',\ \"\"),\ '\\(Test\\s*\\)\\(\\d\\)\\D\\@=',\ '\\1\ \\2',\ "") 1406 " vim: fdt=substitute(substitute(foldtext(),\ '\\%(^+--\\)\\@<=\\(\\s*\\)\\(.\\{-}\\)\:\ \\%(\"\ \\)\\=\\(Test\ \\d*\\)\:\\s*',\ '\\3\ (\\2)\:\ \\1',\ \"\"),\ '\\(Test\\s*\\)\\(\\d\\)\\D\\@=',\ '\\1\ \\2',\ "")
1397 "------------------------------------------------------------------------------- 1407 "-------------------------------------------------------------------------------