diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-03-23 01:26:07 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-03-23 01:26:13 -0400 |
commit | 6b3775bbe27010d371c6e3f0e9df5a56d94aeaba (patch) | |
tree | eb3362f81a65e25dee2a659b331209a29fbfb6b9 | |
parent | b5582d1b32fe721931e3cd28daeb1bca51beb53c (diff) | |
download | rneovim-6b3775bbe27010d371c6e3f0e9df5a56d94aeaba.tar.gz rneovim-6b3775bbe27010d371c6e3f0e9df5a56d94aeaba.tar.bz2 rneovim-6b3775bbe27010d371c6e3f0e9df5a56d94aeaba.zip |
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
-rw-r--r-- | src/nvim/testdir/test_functions.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 824baffbc9..c0faf1acdc 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -1049,3 +1049,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 |