Permalink
Browse files

patch 8.1.0189: function defined in sandbox not tested

Problem:    Function defined in sandbox not tested.
Solution:   Add a text.
  • Loading branch information...
brammool committed Jul 15, 2018
1 parent b477af2 commit d90a144eda047816acffc7a8f297b43a7120710e
Showing with 18 additions and 0 deletions.
  1. +16 −0 src/testdir/test_functions.vim
  2. +2 −0 src/version.c
@@ -984,3 +984,19 @@ func Test_libcall_libcallnr()
call assert_fails("call libcall('Xdoesnotexist_', 'getenv', 'HOME')", 'E364:')
call assert_fails("call libcallnr('Xdoesnotexist_', 'strlen', 'abcd')", 'E364:')
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
@@ -789,6 +789,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
189,
/**/
188,
/**/

0 comments on commit d90a144

Please sign in to comment.