mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.1.0189: function defined in sandbox not tested
Problem: Function defined in sandbox not tested. Solution: Add a text.
This commit is contained in:
@@ -984,3 +984,19 @@ func Test_libcall_libcallnr()
|
|||||||
call assert_fails("call libcall('Xdoesnotexist_', 'getenv', 'HOME')", 'E364:')
|
call assert_fails("call libcall('Xdoesnotexist_', 'getenv', 'HOME')", 'E364:')
|
||||||
call assert_fails("call libcallnr('Xdoesnotexist_', 'strlen', 'abcd')", 'E364:')
|
call assert_fails("call libcallnr('Xdoesnotexist_', 'strlen', 'abcd')", 'E364:')
|
||||||
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
|
||||||
|
@@ -789,6 +789,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
189,
|
||||||
/**/
|
/**/
|
||||||
188,
|
188,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user