diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-03-24 12:55:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-24 12:55:41 +0100 |
| commit | f705ed22fd9ae8a0477779f822bd99dfb010ea4b (patch) | |
| tree | d29d3bd48a02fc62f4516a2d0b65484c54efc28f /src/nvim/testdir/test_functions.vim | |
| parent | 0920c6ca812d673628cf6d04d68af50cddccbd3e (diff) | |
| parent | a73e0e8e773003eff41795cd6dac2c1213e2eaf8 (diff) | |
| download | rneovim-f705ed22fd9ae8a0477779f822bd99dfb010ea4b.tar.gz rneovim-f705ed22fd9ae8a0477779f822bd99dfb010ea4b.tar.bz2 rneovim-f705ed22fd9ae8a0477779f822bd99dfb010ea4b.zip | |
Merge #9776 from janlazo/vim-8.1.0177
Diffstat (limited to 'src/nvim/testdir/test_functions.vim')
| -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 |