0
0
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:
Bram Moolenaar
2018-07-15 20:24:31 +02:00
parent b477af2260
commit d90a144eda
2 changed files with 18 additions and 0 deletions

View File

@@ -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

View File

@@ -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,
/**/ /**/