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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0896
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.0896
Problem: Tests for restricted mode no run for MS-Windows GUI.
Solution: Make tests also work in MS-Windows GUI.
Files: src/testdir/test_restricted.vim
*** ../vim-8.1.0895/src/testdir/test_restricted.vim 2019-02-09 11:13:07.003647800 +0100
--- src/testdir/test_restricted.vim 2019-02-11 21:43:42.560393515 +0100
***************
*** 2,28 ****
source shared.vim
! if has('win32') && has('gui')
! " Win32 GUI shows a dialog instead of displaying the error in the last line.
! finish
! endif
func Test_restricted()
! let cmd = GetVimCommand('Xrestricted')
! if cmd == ''
! return
! endif
!
! call writefile([
! \ "silent !ls",
! \ "call writefile([v:errmsg], 'Xrestrout')",
! \ "qa!",
! \ ], 'Xrestricted')
! call system(cmd . ' -Z')
! call assert_match('E145:', join(readfile('Xrestrout')))
!
! call delete('Xrestricted')
! call delete('Xrestrout')
endfunc
func Run_restricted_test(ex_cmd, error)
--- 2,14 ----
source shared.vim
! "if has('win32') && has('gui')
! " " Win32 GUI shows a dialog instead of displaying the error in the last line.
! " finish
! "endif
func Test_restricted()
! call Run_restricted_test('!ls', 'E145:')
endfunc
func Run_restricted_test(ex_cmd, error)
***************
*** 31,40 ****
return
endif
call writefile([
! \ a:ex_cmd,
! \ "call writefile([v:errmsg], 'Xrestrout')",
! \ "qa!",
\ ], 'Xrestricted')
call system(cmd . ' -Z')
call assert_match(a:error, join(readfile('Xrestrout')))
--- 17,31 ----
return
endif
+ " Use a VimEnter autocommand to avoid that the error message is displayed in
+ " a dialog with an OK button.
call writefile([
! \ "func Init()",
! \ " silent! " . a:ex_cmd,
! \ " call writefile([v:errmsg], 'Xrestrout')",
! \ " qa!",
! \ "endfunc",
! \ "au VimEnter * call Init()",
\ ], 'Xrestricted')
call system(cmd . ' -Z')
call assert_match(a:error, join(readfile('Xrestrout')))
*** ../vim-8.1.0895/src/version.c 2019-02-10 23:26:10.099319000 +0100
--- src/version.c 2019-02-11 21:42:44.812691413 +0100
***************
*** 785,786 ****
--- 785,788 ----
{ /* Add new patch number below this line */
+ /**/
+ 896,
/**/
--
(letter from Mark to Mike, about the film's probable certificate)
For an 'A' we would have to: Lose as many shits as possible; Take Jesus
Christ out, if possible; Loose "I fart in your general direction"; Lose
"the oral sex"; Lose "oh, fuck off"; Lose "We make castanets out of your
testicles"
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// 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 ///
|