1
0
forked from aniani/vim

patch 8.2.0699: Vim9: not all errors tested

Problem:    Vim9: not all errors tested.
Solution:   Add test for deleted function.  Bail out on first error.
This commit is contained in:
Bram Moolenaar
2020-05-05 21:25:22 +02:00
parent f9ab52e155
commit 015f4267f4
5 changed files with 50 additions and 26 deletions

View File

@@ -642,6 +642,23 @@ func Test_E1056_1059()
call assert_equal(1, caught_1059)
endfunc
func DelMe()
echo 'DelMe'
endfunc
def Test_deleted_function()
CheckDefExecFailure([
'let RefMe: func = function("g:DelMe")',
'delfunc g:DelMe',
'echo RefMe()'], 'E117:')
enddef
def Test_unknown_function()
CheckDefExecFailure([
'let Ref: func = function("NotExist")',
'delfunc g:NotExist'], 'E700:')
enddef
def RefFunc(Ref: func(string): string): string
return Ref('more')
enddef