# HG changeset patch # User Christian Brabandt # Date 1531679406 -7200 # Node ID e73c0a0e7e87a5be746903578796751d249c2603 # Parent 723487cd78765587262a92c88b854dfc40ef8701 patch 8.1.0189: function defined in sandbox not tested commit https://github.com/vim/vim/commit/d90a144eda047816acffc7a8f297b43a7120710e Author: Bram Moolenaar Date: Sun Jul 15 20:24:31 2018 +0200 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 --- 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 --- a/src/version.c +++ b/src/version.c @@ -790,6 +790,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 189, +/**/ 188, /**/ 187,