summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0189
blob: bb02fab77c414bcef686bc51a5970a004f1f23b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0189
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0189
Problem:    Function defined in sandbox not tested.
Solution:   Add a text.
Files:	    src/testdir/test_functions.vim


*** ../vim-8.1.0188/src/testdir/test_functions.vim	Tue Jun 19 19:46:01 2018
--- src/testdir/test_functions.vim	Tue Jul 10 19:30:01 2018
***************
*** 984,986 ****
--- 984,1002 ----
    call assert_fails("call libcall('Xdoesnotexist_', 'getenv', 'HOME')", 'E364:')
    call assert_fails("call libcallnr('Xdoesnotexist_', 'strlen', 'abcd')", 'E364:')
  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
*** ../vim-8.1.0188/src/version.c	Sun Jul 15 17:36:28 2018
--- src/version.c	Sun Jul 15 20:22:12 2018
***************
*** 791,792 ****
--- 791,794 ----
  {   /* Add new patch number below this line */
+ /**/
+     189,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
252. You vote for foreign officials.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///