diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-07-15 20:24:31 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-07-15 20:24:31 +0200 |
commit | d90a144eda047816acffc7a8f297b43a7120710e (patch) | |
tree | 500f0011889dba40336fc1f3c8ddc64e0f9fc206 | |
parent | b477af2260d9bc7ae7f743f0a14265d7ee12ee09 (diff) | |
download | vim-git-d90a144eda047816acffc7a8f297b43a7120710e.tar.gz |
patch 8.1.0189: function defined in sandbox not testedv8.1.0189
Problem: Function defined in sandbox not tested.
Solution: Add a text.
-rw-r--r-- | src/testdir/test_functions.vim | 16 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 18 insertions, 0 deletions
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\<Esc>")} + 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 @@ -790,6 +790,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 189, +/**/ 188, /**/ 187, |