From: Bram Moolenaar Date: Sun, 15 Jul 2018 18:24:31 +0000 (+0200) Subject: patch 8.1.0189: function defined in sandbox not tested X-Git-Tag: v8.1.0189 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d90a144eda047816acffc7a8f297b43a7120710e;p=vim patch 8.1.0189: function defined in sandbox not tested Problem: Function defined in sandbox not tested. Solution: Add a text. --- diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index 7efbbe882..5cfaaa064 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -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\")} + call assert_fails('call F()', 'E48:') + unlet F + + call assert_fails('call Fsandbox()', 'E48:') + delfunc Fsandbox +endfunc diff --git a/src/version.c b/src/version.c index 892b9aea1..c48804cc7 100644 --- a/src/version.c +++ b/src/version.c @@ -789,6 +789,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 189, /**/ 188, /**/