Skip to content

Commit d90a144

Browse files
committed
patch 8.1.0189: function defined in sandbox not tested
Problem: Function defined in sandbox not tested. Solution: Add a text.
1 parent b477af2 commit d90a144

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/testdir/test_functions.vim

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,3 +984,19 @@ func Test_libcall_libcallnr()
984984
call assert_fails("call libcall('Xdoesnotexist_', 'getenv', 'HOME')", 'E364:')
985985
call assert_fails("call libcallnr('Xdoesnotexist_', 'strlen', 'abcd')", 'E364:')
986986
endfunc
987+
988+
sandbox function Fsandbox()
989+
normal ix
990+
endfunc
991+
992+
func Test_func_sandbox()
993+
sandbox let F = {-> 'hello'}
994+
call assert_equal('hello', F())
995+
996+
sandbox let F = {-> execute("normal ix\<Esc>")}
997+
call assert_fails('call F()', 'E48:')
998+
unlet F
999+
1000+
call assert_fails('call Fsandbox()', 'E48:')
1001+
delfunc Fsandbox
1002+
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,8 @@ static char *(features[]) =
789789

790790
static int included_patches[] =
791791
{ /* Add new patch number below this line */
792+
/**/
793+
189,
792794
/**/
793795
188,
794796
/**/

0 commit comments

Comments
 (0)