vim-patch:8.1.0189: function defined in sandbox not tested

Problem:    Function defined in sandbox not tested.
Solution:   Add a text.
d90a144eda
This commit is contained in:
Jan Edmund Lazo 2019-03-23 01:26:07 -04:00
parent b5582d1b32
commit 6b3775bbe2

View File

@ -1049,3 +1049,19 @@ func Test_func_range_with_edit()
call delete('Xfuncrange2')
bwipe!
endfunc
sandbox function Fsandbox()
normal ix
endfunc
func Test_func_sandbox()
sandbox let F = {-> 'hello'}
call assert_equal('hello', F())
sandbox let F = {-> execute("normal ix\<Esc>")}
call assert_fails('call F()', 'E48:')
unlet F
call assert_fails('call Fsandbox()', 'E48:')
delfunc Fsandbox
endfunc