mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.0.0667: more tests for :endfunc
[Only the test is merged; code was addressed by 60c025267265.]
Problem: Memory access error when command follows :endfunction. (Nikolai
Pavlov)
Solution: Make memory handling in :function straightforward. (closes vim/vim#1793)
53564f7c1a
This commit is contained in:
parent
fb855feb52
commit
d6cbe6ca87
@ -1231,6 +1231,11 @@ func Test_endfunction_trailing()
|
||||
delfunc Xtest
|
||||
unlet done
|
||||
|
||||
" trailing line break
|
||||
exe "func Xtest()\necho 'hello'\nendfunc\n"
|
||||
call assert_true(exists('*Xtest'))
|
||||
delfunc Xtest
|
||||
|
||||
set verbose=1
|
||||
exe "func Xtest()\necho 'hello'\nendfunc \" garbage"
|
||||
call assert_true(exists('*Xtest'))
|
||||
@ -1240,6 +1245,11 @@ func Test_endfunction_trailing()
|
||||
call assert_true(exists('*Xtest'))
|
||||
delfunc Xtest
|
||||
set verbose=0
|
||||
|
||||
function Foo()
|
||||
echo 'hello'
|
||||
endfunction | echo 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
||||
delfunc Foo
|
||||
endfunc
|
||||
|
||||
func Test_delfunction_force()
|
||||
|
Loading…
Reference in New Issue
Block a user