Commit | Line | Data |
599cee73 |
1 | pp_sys.c AOK |
2 | |
767a6a26 |
3 | untie attempted while %d inner references still exist [pp_untie] |
599cee73 |
4 | sub TIESCALAR { bless [] } ; tie $a, 'main'; untie $a ; |
5 | |
767a6a26 |
6 | Filehandle %s opened only for input [pp_leavewrite] |
599cee73 |
7 | format STDIN = |
8 | . |
9 | write STDIN; |
10 | |
767a6a26 |
11 | Write on closed filehandle %s [pp_leavewrite] |
599cee73 |
12 | format STDIN = |
13 | . |
14 | close STDIN; |
15 | write STDIN ; |
16 | |
767a6a26 |
17 | page overflow [pp_leavewrite] |
599cee73 |
18 | |
767a6a26 |
19 | Filehandle %s never opened [pp_prtf] |
599cee73 |
20 | $a = "abc"; printf $a "fred" |
21 | |
767a6a26 |
22 | Filehandle %s opened only for input [pp_prtf] |
599cee73 |
23 | $a = "abc"; |
24 | printf $a "fred" |
25 | |
767a6a26 |
26 | printf on closed filehandle %s [pp_prtf] |
599cee73 |
27 | close STDIN ; |
28 | printf STDIN "fred" |
29 | |
767a6a26 |
30 | Syswrite on closed filehandle [pp_send] |
599cee73 |
31 | close STDIN; |
32 | syswrite STDIN, "fred", 1; |
33 | |
767a6a26 |
34 | Send on closed socket [pp_send] |
599cee73 |
35 | close STDIN; |
36 | send STDIN, "fred", 1 |
37 | |
767a6a26 |
38 | bind() on closed fd [pp_bind] |
599cee73 |
39 | close STDIN; |
40 | bind STDIN, "fred" ; |
41 | |
42 | |
767a6a26 |
43 | connect() on closed fd [pp_connect] |
599cee73 |
44 | close STDIN; |
45 | connect STDIN, "fred" ; |
46 | |
767a6a26 |
47 | listen() on closed fd [pp_listen] |
599cee73 |
48 | close STDIN; |
49 | listen STDIN, 2; |
50 | |
767a6a26 |
51 | accept() on closed fd [pp_accept] |
599cee73 |
52 | close STDIN; |
53 | accept STDIN, "fred" ; |
54 | |
767a6a26 |
55 | shutdown() on closed fd [pp_shutdown] |
599cee73 |
56 | close STDIN; |
57 | shutdown STDIN, 0; |
58 | |
767a6a26 |
59 | [gs]etsockopt() on closed fd [pp_ssockopt] |
599cee73 |
60 | close STDIN; |
61 | setsockopt STDIN, 1,2,3; |
62 | getsockopt STDIN, 1,2; |
63 | |
767a6a26 |
64 | get{sock, peer}name() on closed fd [pp_getpeername] |
599cee73 |
65 | close STDIN; |
66 | getsockname STDIN; |
67 | getpeername STDIN; |
68 | |
767a6a26 |
69 | warn(warn_nl, "stat"); [pp_stat] |
599cee73 |
70 | |
71 | Test on unopened file <%s> |
72 | close STDIN ; -T STDIN ; |
73 | |
767a6a26 |
74 | warn(warn_nl, "open"); [pp_fttext] |
599cee73 |
75 | -T "abc\ndef" ; |
76 | |
767a6a26 |
77 | Filehandle %s opened only for output [pp_sysread] |
78 | my $file = "./xcv" ; |
79 | open(F, ">$file") ; |
80 | my $a = sysread(F, $a,10) ; |
81 | |
599cee73 |
82 | |
83 | |
84 | __END__ |
767a6a26 |
85 | # pp_sys.c [pp_untie] |
4438c4b7 |
86 | use warnings 'untie' ; |
599cee73 |
87 | sub TIESCALAR { bless [] } ; |
88 | $b = tie $a, 'main'; |
89 | untie $a ; |
4438c4b7 |
90 | no warnings 'untie' ; |
0453d815 |
91 | $c = tie $d, 'main'; |
92 | untie $d ; |
599cee73 |
93 | EXPECT |
94 | untie attempted while 1 inner references still exist at - line 5. |
95 | ######## |
767a6a26 |
96 | # pp_sys.c [pp_leavewrite] |
4438c4b7 |
97 | use warnings 'io' ; |
599cee73 |
98 | format STDIN = |
99 | . |
100 | write STDIN; |
4438c4b7 |
101 | no warnings 'io' ; |
0453d815 |
102 | write STDIN; |
599cee73 |
103 | EXPECT |
af8c498a |
104 | Filehandle main::STDIN opened only for input at - line 5. |
599cee73 |
105 | ######## |
767a6a26 |
106 | # pp_sys.c [pp_leavewrite] |
4438c4b7 |
107 | use warnings 'closed' ; |
599cee73 |
108 | format STDIN = |
109 | . |
110 | close STDIN; |
111 | write STDIN; |
4438c4b7 |
112 | no warnings 'closed' ; |
0453d815 |
113 | write STDIN; |
599cee73 |
114 | EXPECT |
af8c498a |
115 | Write on closed filehandle main::STDIN at - line 6. |
599cee73 |
116 | ######## |
767a6a26 |
117 | # pp_sys.c [pp_leavewrite] |
4438c4b7 |
118 | use warnings 'io' ; |
599cee73 |
119 | format STDOUT_TOP = |
120 | abc |
121 | . |
122 | format STDOUT = |
123 | def |
124 | ghi |
125 | . |
126 | $= = 1 ; |
127 | $- =1 ; |
3eeba6fb |
128 | open STDOUT, ">".($^O eq 'VMS'? 'NL:' : '/dev/null') ; |
599cee73 |
129 | write ; |
4438c4b7 |
130 | no warnings 'io' ; |
0453d815 |
131 | write ; |
599cee73 |
132 | EXPECT |
133 | page overflow at - line 13. |
134 | ######## |
767a6a26 |
135 | # pp_sys.c [pp_prtf] |
4438c4b7 |
136 | use warnings 'unopened' ; |
599cee73 |
137 | $a = "abc"; |
0453d815 |
138 | printf $a "fred"; |
4438c4b7 |
139 | no warnings 'unopened' ; |
0453d815 |
140 | printf $a "fred"; |
599cee73 |
141 | EXPECT |
142 | Filehandle main::abc never opened at - line 4. |
143 | ######## |
767a6a26 |
144 | # pp_sys.c [pp_prtf] |
4438c4b7 |
145 | use warnings 'closed' ; |
599cee73 |
146 | close STDIN ; |
0453d815 |
147 | printf STDIN "fred"; |
4438c4b7 |
148 | no warnings 'closed' ; |
0453d815 |
149 | printf STDIN "fred"; |
599cee73 |
150 | EXPECT |
151 | printf on closed filehandle main::STDIN at - line 4. |
152 | ######## |
767a6a26 |
153 | # pp_sys.c [pp_prtf] |
4438c4b7 |
154 | use warnings 'io' ; |
0453d815 |
155 | printf STDIN "fred"; |
4438c4b7 |
156 | no warnings 'io' ; |
0453d815 |
157 | printf STDIN "fred"; |
599cee73 |
158 | EXPECT |
159 | Filehandle main::STDIN opened only for input at - line 3. |
160 | ######## |
767a6a26 |
161 | # pp_sys.c [pp_send] |
4438c4b7 |
162 | use warnings 'closed' ; |
599cee73 |
163 | close STDIN; |
164 | syswrite STDIN, "fred", 1; |
4438c4b7 |
165 | no warnings 'closed' ; |
0453d815 |
166 | syswrite STDIN, "fred", 1; |
599cee73 |
167 | EXPECT |
168 | Syswrite on closed filehandle at - line 4. |
169 | ######## |
767a6a26 |
170 | # pp_sys.c [pp_prtf pp_send pp_bind pp_connect pp_listen pp_accept pp_shutdown pp_ssockopt ppp_getpeername] |
4438c4b7 |
171 | use warnings 'io' ; |
599cee73 |
172 | use Config; |
173 | BEGIN { |
174 | if ( $^O ne 'VMS' and ! $Config{d_socket}) { |
175 | print <<EOM ; |
176 | SKIPPED |
177 | # send not present |
178 | # bind not present |
179 | # connect not present |
180 | # accept not present |
181 | # shutdown not present |
182 | # setsockopt not present |
183 | # getsockopt not present |
184 | # getsockname not present |
185 | # getpeername not present |
186 | EOM |
187 | exit ; |
188 | } |
189 | } |
190 | close STDIN; |
191 | send STDIN, "fred", 1; |
192 | bind STDIN, "fred" ; |
193 | connect STDIN, "fred" ; |
194 | listen STDIN, 2; |
195 | accept STDIN, "fred" ; |
196 | shutdown STDIN, 0; |
197 | setsockopt STDIN, 1,2,3; |
198 | getsockopt STDIN, 1,2; |
199 | getsockname STDIN; |
200 | getpeername STDIN; |
4438c4b7 |
201 | no warnings 'io' ; |
0453d815 |
202 | send STDIN, "fred", 1; |
203 | bind STDIN, "fred" ; |
204 | connect STDIN, "fred" ; |
205 | listen STDIN, 2; |
206 | accept STDIN, "fred" ; |
207 | shutdown STDIN, 0; |
208 | setsockopt STDIN, 1,2,3; |
209 | getsockopt STDIN, 1,2; |
210 | getsockname STDIN; |
211 | getpeername STDIN; |
599cee73 |
212 | EXPECT |
213 | Send on closed socket at - line 22. |
214 | bind() on closed fd at - line 23. |
215 | connect() on closed fd at - line 24. |
216 | listen() on closed fd at - line 25. |
217 | accept() on closed fd at - line 26. |
218 | shutdown() on closed fd at - line 27. |
219 | [gs]etsockopt() on closed fd at - line 28. |
220 | [gs]etsockopt() on closed fd at - line 29. |
221 | get{sock, peer}name() on closed fd at - line 30. |
222 | get{sock, peer}name() on closed fd at - line 31. |
223 | ######## |
767a6a26 |
224 | # pp_sys.c [pp_stat] |
4438c4b7 |
225 | use warnings 'newline' ; |
599cee73 |
226 | stat "abc\ndef"; |
4438c4b7 |
227 | no warnings 'newline' ; |
0453d815 |
228 | stat "abc\ndef"; |
599cee73 |
229 | EXPECT |
230 | Unsuccessful stat on filename containing newline at - line 3. |
231 | ######## |
767a6a26 |
232 | # pp_sys.c [pp_fttext] |
4438c4b7 |
233 | use warnings 'unopened' ; |
599cee73 |
234 | close STDIN ; |
235 | -T STDIN ; |
4438c4b7 |
236 | no warnings 'unopened' ; |
0453d815 |
237 | -T STDIN ; |
599cee73 |
238 | EXPECT |
239 | Test on unopened file <STDIN> at - line 4. |
240 | ######## |
767a6a26 |
241 | # pp_sys.c [pp_fttext] |
4438c4b7 |
242 | use warnings 'newline' ; |
599cee73 |
243 | -T "abc\ndef" ; |
4438c4b7 |
244 | no warnings 'newline' ; |
0453d815 |
245 | -T "abc\ndef" ; |
599cee73 |
246 | EXPECT |
247 | Unsuccessful open on filename containing newline at - line 3. |
767a6a26 |
248 | ######## |
249 | # pp_sys.c [pp_sysread] |
250 | use warnings 'io' ; |
251 | my $file = "./xcv" ; |
252 | open(F, ">$file") ; |
253 | my $a = sysread(F, $a,10) ; |
254 | no warnings 'io' ; |
255 | my $a = sysread(F, $a,10) ; |
256 | close F ; |
257 | unlink $file ; |
258 | EXPECT |
259 | Filehandle main::F opened only for output at - line 5. |