Commit a52200ce authored by Jan Edmund Lazo's avatar Jan Edmund Lazo Committed by James McCoy

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

Problem:    Function defined in sandbox not tested.
Solution:   Add a text.
https://github.com/vim/vim/commit/d90a144eda047816acffc7a8f297b43a7120710e

(cherry picked from commit f514b7fb)
Signed-off-by: James McCoy's avatarJames McCoy <jamessan@debian.org>
parent 3260fb7d
......@@ -1037,3 +1037,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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment