mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.0189: function defined in sandbox not tested
Problem: Function defined in sandbox not tested.
Solution: Add a text.
d90a144eda
This commit is contained in:
parent
b5582d1b32
commit
6b3775bbe2
@ -1049,3 +1049,19 @@ func Test_func_range_with_edit()
|
|||||||
call delete('Xfuncrange2')
|
call delete('Xfuncrange2')
|
||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user