diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-03-23 01:26:07 -0400 |
|---|---|---|
| committer | James McCoy <jamessan@jamessan.com> | 2019-06-25 22:28:41 -0400 |
| commit | f514b7fbbc75b4464af5abe44d5f859a0d904495 (patch) | |
| tree | 634daaec726a9bb7282f412d8eaee8261447f8c6 /src/nvim/testdir | |
| parent | c202e4a86856594a6602a795314a081c497c2df5 (diff) | |
| download | rneovim-f514b7fbbc75b4464af5abe44d5f859a0d904495.tar.gz rneovim-f514b7fbbc75b4464af5abe44d5f859a0d904495.tar.bz2 rneovim-f514b7fbbc75b4464af5abe44d5f859a0d904495.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
Diffstat (limited to 'src/nvim/testdir')
| -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 7dc9f31ce7..292f69d704 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -1037,3 +1037,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 |