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