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 | |
9a7dcd9c |
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 | |
9a7dcd9c |
26 | printf() on closed filehandle %s [pp_prtf] |
599cee73 |
27 | close STDIN ; |
28 | printf STDIN "fred" |
29 | |
69282e91 |
30 | syswrite() on closed filehandle %s [pp_send] |
599cee73 |
31 | close STDIN; |
32 | syswrite STDIN, "fred", 1; |
33 | |
69282e91 |
34 | send() on closed socket %s [pp_send] |
599cee73 |
35 | close STDIN; |
36 | send STDIN, "fred", 1 |
37 | |
69282e91 |
38 | bind() on closed socket %s [pp_bind] |
599cee73 |
39 | close STDIN; |
40 | bind STDIN, "fred" ; |
41 | |
42 | |
69282e91 |
43 | connect() on closed socket %s [pp_connect] |
599cee73 |
44 | close STDIN; |
45 | connect STDIN, "fred" ; |
46 | |
69282e91 |
47 | listen() on closed socket %s [pp_listen] |
599cee73 |
48 | close STDIN; |
49 | listen STDIN, 2; |
50 | |
69282e91 |
51 | accept() on closed socket %s [pp_accept] |
599cee73 |
52 | close STDIN; |
69282e91 |
53 | accept "fred", STDIN ; |
599cee73 |
54 | |
69282e91 |
55 | shutdown() on closed socket %s [pp_shutdown] |
599cee73 |
56 | close STDIN; |
57 | shutdown STDIN, 0; |
58 | |
69282e91 |
59 | setsockopt() on closed socket %s [pp_ssockopt] |
60 | getsockopt() on closed socket %s [pp_ssockopt] |
599cee73 |
61 | close STDIN; |
62 | setsockopt STDIN, 1,2,3; |
63 | getsockopt STDIN, 1,2; |
64 | |
69282e91 |
65 | getsockname() on closed socket %s [pp_getpeername] |
66 | getpeername() on closed socket %s [pp_getpeername] |
599cee73 |
67 | close STDIN; |
68 | getsockname STDIN; |
69 | getpeername STDIN; |
70 | |
69282e91 |
71 | flock() on closed socket %s [pp_flock] |
72 | close STDIN; |
73 | flock STDIN, 8; |
74 | |
767a6a26 |
75 | warn(warn_nl, "stat"); [pp_stat] |
599cee73 |
76 | |
77 | Test on unopened file <%s> |
78 | close STDIN ; -T STDIN ; |
79 | |
767a6a26 |
80 | warn(warn_nl, "open"); [pp_fttext] |
599cee73 |
81 | -T "abc\ndef" ; |
82 | |
767a6a26 |
83 | Filehandle %s opened only for output [pp_sysread] |
84 | my $file = "./xcv" ; |
85 | open(F, ">$file") ; |
86 | my $a = sysread(F, $a,10) ; |
87 | |
599cee73 |
88 | |
89 | |
90 | __END__ |
767a6a26 |
91 | # pp_sys.c [pp_untie] |
4438c4b7 |
92 | use warnings 'untie' ; |
599cee73 |
93 | sub TIESCALAR { bless [] } ; |
94 | $b = tie $a, 'main'; |
95 | untie $a ; |
4438c4b7 |
96 | no warnings 'untie' ; |
0453d815 |
97 | $c = tie $d, 'main'; |
98 | untie $d ; |
599cee73 |
99 | EXPECT |
100 | untie attempted while 1 inner references still exist at - line 5. |
101 | ######## |
767a6a26 |
102 | # pp_sys.c [pp_leavewrite] |
4438c4b7 |
103 | use warnings 'io' ; |
599cee73 |
104 | format STDIN = |
105 | . |
106 | write STDIN; |
4438c4b7 |
107 | no warnings 'io' ; |
0453d815 |
108 | write STDIN; |
599cee73 |
109 | EXPECT |
43693395 |
110 | Filehandle STDIN opened only for input at - line 5. |
599cee73 |
111 | ######## |
767a6a26 |
112 | # pp_sys.c [pp_leavewrite] |
4438c4b7 |
113 | use warnings 'closed' ; |
599cee73 |
114 | format STDIN = |
115 | . |
116 | close STDIN; |
117 | write STDIN; |
69282e91 |
118 | opendir STDIN, "."; |
119 | write STDIN; |
120 | closedir STDIN; |
4438c4b7 |
121 | no warnings 'closed' ; |
0453d815 |
122 | write STDIN; |
69282e91 |
123 | opendir STDIN, "."; |
124 | write STDIN; |
599cee73 |
125 | EXPECT |
43693395 |
126 | write() on closed filehandle STDIN at - line 6. |
127 | write() on closed filehandle STDIN at - line 8. |
128 | (Are you trying to call write() on dirhandle STDIN?) |
599cee73 |
129 | ######## |
767a6a26 |
130 | # pp_sys.c [pp_leavewrite] |
4438c4b7 |
131 | use warnings 'io' ; |
599cee73 |
132 | format STDOUT_TOP = |
133 | abc |
134 | . |
135 | format STDOUT = |
136 | def |
137 | ghi |
138 | . |
139 | $= = 1 ; |
140 | $- =1 ; |
3eeba6fb |
141 | open STDOUT, ">".($^O eq 'VMS'? 'NL:' : '/dev/null') ; |
599cee73 |
142 | write ; |
4438c4b7 |
143 | no warnings 'io' ; |
0453d815 |
144 | write ; |
599cee73 |
145 | EXPECT |
146 | page overflow at - line 13. |
147 | ######## |
767a6a26 |
148 | # pp_sys.c [pp_prtf] |
4438c4b7 |
149 | use warnings 'unopened' ; |
599cee73 |
150 | $a = "abc"; |
0453d815 |
151 | printf $a "fred"; |
4438c4b7 |
152 | no warnings 'unopened' ; |
0453d815 |
153 | printf $a "fred"; |
599cee73 |
154 | EXPECT |
43693395 |
155 | Filehandle abc never opened at - line 4. |
599cee73 |
156 | ######## |
767a6a26 |
157 | # pp_sys.c [pp_prtf] |
4438c4b7 |
158 | use warnings 'closed' ; |
599cee73 |
159 | close STDIN ; |
0453d815 |
160 | printf STDIN "fred"; |
69282e91 |
161 | opendir STDIN, "."; |
162 | printf STDIN "fred"; |
163 | closedir STDIN; |
4438c4b7 |
164 | no warnings 'closed' ; |
0453d815 |
165 | printf STDIN "fred"; |
69282e91 |
166 | opendir STDIN, "."; |
167 | printf STDIN "fred"; |
599cee73 |
168 | EXPECT |
43693395 |
169 | printf() on closed filehandle STDIN at - line 4. |
170 | printf() on closed filehandle STDIN at - line 6. |
171 | (Are you trying to call printf() on dirhandle STDIN?) |
599cee73 |
172 | ######## |
767a6a26 |
173 | # pp_sys.c [pp_prtf] |
4438c4b7 |
174 | use warnings 'io' ; |
0453d815 |
175 | printf STDIN "fred"; |
4438c4b7 |
176 | no warnings 'io' ; |
0453d815 |
177 | printf STDIN "fred"; |
599cee73 |
178 | EXPECT |
43693395 |
179 | Filehandle STDIN opened only for input at - line 3. |
599cee73 |
180 | ######## |
767a6a26 |
181 | # pp_sys.c [pp_send] |
4438c4b7 |
182 | use warnings 'closed' ; |
599cee73 |
183 | close STDIN; |
184 | syswrite STDIN, "fred", 1; |
69282e91 |
185 | opendir STDIN, "."; |
186 | syswrite STDIN, "fred", 1; |
187 | closedir STDIN; |
4438c4b7 |
188 | no warnings 'closed' ; |
0453d815 |
189 | syswrite STDIN, "fred", 1; |
69282e91 |
190 | opendir STDIN, "."; |
191 | syswrite STDIN, "fred", 1; |
599cee73 |
192 | EXPECT |
43693395 |
193 | syswrite() on closed filehandle STDIN at - line 4. |
194 | syswrite() on closed filehandle STDIN at - line 6. |
195 | (Are you trying to call syswrite() on dirhandle STDIN?) |
69282e91 |
196 | ######## |
197 | # pp_sys.c [pp_flock] |
f0963acb |
198 | use Config; |
199 | BEGIN { |
200 | if ( $^O eq 'VMS' and ! $Config{d_flock}) { |
201 | print <<EOM ; |
202 | SKIPPED |
203 | # flock not present |
204 | EOM |
205 | exit ; |
206 | } |
207 | } |
69282e91 |
208 | use warnings 'closed' ; |
209 | close STDIN; |
210 | flock STDIN, 8; |
211 | opendir STDIN, "."; |
212 | flock STDIN, 8; |
213 | no warnings 'closed' ; |
214 | flock STDIN, 8; |
215 | opendir STDIN, "."; |
216 | flock STDIN, 8; |
217 | EXPECT |
43693395 |
218 | flock() on closed filehandle STDIN at - line 14. |
219 | flock() on closed filehandle STDIN at - line 16. |
220 | (Are you trying to call flock() on dirhandle STDIN?) |
599cee73 |
221 | ######## |
767a6a26 |
222 | # pp_sys.c [pp_prtf pp_send pp_bind pp_connect pp_listen pp_accept pp_shutdown pp_ssockopt ppp_getpeername] |
4438c4b7 |
223 | use warnings 'io' ; |
599cee73 |
224 | use Config; |
225 | BEGIN { |
226 | if ( $^O ne 'VMS' and ! $Config{d_socket}) { |
227 | print <<EOM ; |
228 | SKIPPED |
229 | # send not present |
230 | # bind not present |
231 | # connect not present |
232 | # accept not present |
233 | # shutdown not present |
234 | # setsockopt not present |
235 | # getsockopt not present |
236 | # getsockname not present |
237 | # getpeername not present |
238 | EOM |
239 | exit ; |
240 | } |
241 | } |
242 | close STDIN; |
243 | send STDIN, "fred", 1; |
244 | bind STDIN, "fred" ; |
245 | connect STDIN, "fred" ; |
246 | listen STDIN, 2; |
69282e91 |
247 | accept "fred", STDIN; |
248 | shutdown STDIN, 0; |
249 | setsockopt STDIN, 1,2,3; |
250 | getsockopt STDIN, 1,2; |
251 | getsockname STDIN; |
252 | getpeername STDIN; |
253 | opendir STDIN, "."; |
254 | send STDIN, "fred", 1; |
255 | bind STDIN, "fred" ; |
256 | connect STDIN, "fred" ; |
257 | listen STDIN, 2; |
258 | accept "fred", STDIN; |
599cee73 |
259 | shutdown STDIN, 0; |
260 | setsockopt STDIN, 1,2,3; |
261 | getsockopt STDIN, 1,2; |
262 | getsockname STDIN; |
263 | getpeername STDIN; |
69282e91 |
264 | closedir STDIN; |
4438c4b7 |
265 | no warnings 'io' ; |
0453d815 |
266 | send STDIN, "fred", 1; |
267 | bind STDIN, "fred" ; |
268 | connect STDIN, "fred" ; |
269 | listen STDIN, 2; |
270 | accept STDIN, "fred" ; |
271 | shutdown STDIN, 0; |
272 | setsockopt STDIN, 1,2,3; |
273 | getsockopt STDIN, 1,2; |
274 | getsockname STDIN; |
275 | getpeername STDIN; |
69282e91 |
276 | opendir STDIN, "."; |
277 | send STDIN, "fred", 1; |
278 | bind STDIN, "fred" ; |
279 | connect STDIN, "fred" ; |
280 | listen STDIN, 2; |
281 | accept "fred", STDIN; |
282 | shutdown STDIN, 0; |
283 | setsockopt STDIN, 1,2,3; |
284 | getsockopt STDIN, 1,2; |
285 | getsockname STDIN; |
286 | getpeername STDIN; |
599cee73 |
287 | EXPECT |
43693395 |
288 | send() on closed socket STDIN at - line 22. |
289 | bind() on closed socket STDIN at - line 23. |
290 | connect() on closed socket STDIN at - line 24. |
291 | listen() on closed socket STDIN at - line 25. |
292 | accept() on closed socket STDIN at - line 26. |
293 | shutdown() on closed socket STDIN at - line 27. |
294 | setsockopt() on closed socket STDIN at - line 28. |
295 | getsockopt() on closed socket STDIN at - line 29. |
296 | getsockname() on closed socket STDIN at - line 30. |
297 | getpeername() on closed socket STDIN at - line 31. |
298 | send() on closed socket STDIN at - line 33. |
299 | (Are you trying to call send() on dirhandle STDIN?) |
300 | bind() on closed socket STDIN at - line 34. |
301 | (Are you trying to call bind() on dirhandle STDIN?) |
302 | connect() on closed socket STDIN at - line 35. |
303 | (Are you trying to call connect() on dirhandle STDIN?) |
304 | listen() on closed socket STDIN at - line 36. |
305 | (Are you trying to call listen() on dirhandle STDIN?) |
306 | accept() on closed socket STDIN at - line 37. |
307 | (Are you trying to call accept() on dirhandle STDIN?) |
308 | shutdown() on closed socket STDIN at - line 38. |
309 | (Are you trying to call shutdown() on dirhandle STDIN?) |
310 | setsockopt() on closed socket STDIN at - line 39. |
311 | (Are you trying to call setsockopt() on dirhandle STDIN?) |
312 | getsockopt() on closed socket STDIN at - line 40. |
313 | (Are you trying to call getsockopt() on dirhandle STDIN?) |
314 | getsockname() on closed socket STDIN at - line 41. |
315 | (Are you trying to call getsockname() on dirhandle STDIN?) |
316 | getpeername() on closed socket STDIN at - line 42. |
317 | (Are you trying to call getpeername() on dirhandle STDIN?) |
599cee73 |
318 | ######## |
767a6a26 |
319 | # pp_sys.c [pp_stat] |
4438c4b7 |
320 | use warnings 'newline' ; |
599cee73 |
321 | stat "abc\ndef"; |
4438c4b7 |
322 | no warnings 'newline' ; |
0453d815 |
323 | stat "abc\ndef"; |
599cee73 |
324 | EXPECT |
325 | Unsuccessful stat on filename containing newline at - line 3. |
326 | ######## |
767a6a26 |
327 | # pp_sys.c [pp_fttext] |
4438c4b7 |
328 | use warnings 'unopened' ; |
599cee73 |
329 | close STDIN ; |
330 | -T STDIN ; |
4438c4b7 |
331 | no warnings 'unopened' ; |
0453d815 |
332 | -T STDIN ; |
599cee73 |
333 | EXPECT |
62459050 |
334 | Test on unopened file STDIN at - line 4. |
599cee73 |
335 | ######## |
767a6a26 |
336 | # pp_sys.c [pp_fttext] |
4438c4b7 |
337 | use warnings 'newline' ; |
599cee73 |
338 | -T "abc\ndef" ; |
4438c4b7 |
339 | no warnings 'newline' ; |
0453d815 |
340 | -T "abc\ndef" ; |
599cee73 |
341 | EXPECT |
342 | Unsuccessful open on filename containing newline at - line 3. |
767a6a26 |
343 | ######## |
344 | # pp_sys.c [pp_sysread] |
345 | use warnings 'io' ; |
346 | my $file = "./xcv" ; |
347 | open(F, ">$file") ; |
348 | my $a = sysread(F, $a,10) ; |
349 | no warnings 'io' ; |
350 | my $a = sysread(F, $a,10) ; |
351 | close F ; |
352 | unlink $file ; |
353 | EXPECT |
43693395 |
354 | Filehandle F opened only for output at - line 5. |