xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/t/lib/warnings/7fatal (revision 0:68f95e015346)
1*0Sstevel@tonic-gateCheck FATAL functionality
2*0Sstevel@tonic-gate
3*0Sstevel@tonic-gate__END__
4*0Sstevel@tonic-gate
5*0Sstevel@tonic-gate# Check compile time warning
6*0Sstevel@tonic-gateuse warnings FATAL => 'syntax' ;
7*0Sstevel@tonic-gate{
8*0Sstevel@tonic-gate    no warnings ;
9*0Sstevel@tonic-gate    $a =+ 1 ;
10*0Sstevel@tonic-gate}
11*0Sstevel@tonic-gate$a =+ 1 ;
12*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
13*0Sstevel@tonic-gateEXPECT
14*0Sstevel@tonic-gateReversed += operator at - line 8.
15*0Sstevel@tonic-gate########
16*0Sstevel@tonic-gate
17*0Sstevel@tonic-gate# Check compile time warning
18*0Sstevel@tonic-gateuse warnings FATAL => 'all' ;
19*0Sstevel@tonic-gate{
20*0Sstevel@tonic-gate    no warnings ;
21*0Sstevel@tonic-gate    my $a =+ 1 ;
22*0Sstevel@tonic-gate}
23*0Sstevel@tonic-gatemy $a =+ 1 ;
24*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
25*0Sstevel@tonic-gateEXPECT
26*0Sstevel@tonic-gateReversed += operator at - line 8.
27*0Sstevel@tonic-gate########
28*0Sstevel@tonic-gate
29*0Sstevel@tonic-gate# Check runtime scope of pragma
30*0Sstevel@tonic-gateuse warnings FATAL => 'uninitialized' ;
31*0Sstevel@tonic-gate{
32*0Sstevel@tonic-gate    no warnings ;
33*0Sstevel@tonic-gate    my $b ; chop $b ;
34*0Sstevel@tonic-gate}
35*0Sstevel@tonic-gatemy $b ; chop $b ;
36*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
37*0Sstevel@tonic-gateEXPECT
38*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 8.
39*0Sstevel@tonic-gate########
40*0Sstevel@tonic-gate
41*0Sstevel@tonic-gate# Check runtime scope of pragma
42*0Sstevel@tonic-gateuse warnings FATAL => 'all' ;
43*0Sstevel@tonic-gate{
44*0Sstevel@tonic-gate    no warnings ;
45*0Sstevel@tonic-gate    my $b ; chop $b ;
46*0Sstevel@tonic-gate}
47*0Sstevel@tonic-gatemy $b ; chop $b ;
48*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
49*0Sstevel@tonic-gateEXPECT
50*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 8.
51*0Sstevel@tonic-gate########
52*0Sstevel@tonic-gate
53*0Sstevel@tonic-gate# Check runtime scope of pragma
54*0Sstevel@tonic-gateno warnings ;
55*0Sstevel@tonic-gate{
56*0Sstevel@tonic-gate    use warnings FATAL => 'uninitialized' ;
57*0Sstevel@tonic-gate    $a = sub { my $b ; chop $b ; }
58*0Sstevel@tonic-gate}
59*0Sstevel@tonic-gate&$a ;
60*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
61*0Sstevel@tonic-gateEXPECT
62*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 6.
63*0Sstevel@tonic-gate########
64*0Sstevel@tonic-gate
65*0Sstevel@tonic-gate# Check runtime scope of pragma
66*0Sstevel@tonic-gateno warnings ;
67*0Sstevel@tonic-gate{
68*0Sstevel@tonic-gate    use warnings FATAL => 'all' ;
69*0Sstevel@tonic-gate    $a = sub { my $b ; chop $b ; }
70*0Sstevel@tonic-gate}
71*0Sstevel@tonic-gate&$a ;
72*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
73*0Sstevel@tonic-gateEXPECT
74*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 6.
75*0Sstevel@tonic-gate########
76*0Sstevel@tonic-gate
77*0Sstevel@tonic-gate--FILE-- abc
78*0Sstevel@tonic-gate$a =+ 1 ;
79*0Sstevel@tonic-gate1;
80*0Sstevel@tonic-gate--FILE--
81*0Sstevel@tonic-gateuse warnings FATAL => 'syntax' ;
82*0Sstevel@tonic-gaterequire "./abc";
83*0Sstevel@tonic-gateEXPECT
84*0Sstevel@tonic-gate
85*0Sstevel@tonic-gate########
86*0Sstevel@tonic-gate
87*0Sstevel@tonic-gate--FILE-- abc
88*0Sstevel@tonic-gateuse warnings FATAL => 'syntax' ;
89*0Sstevel@tonic-gate1;
90*0Sstevel@tonic-gate--FILE--
91*0Sstevel@tonic-gaterequire "./abc";
92*0Sstevel@tonic-gate$a =+ 1 ;
93*0Sstevel@tonic-gateEXPECT
94*0Sstevel@tonic-gate
95*0Sstevel@tonic-gate########
96*0Sstevel@tonic-gate
97*0Sstevel@tonic-gate--FILE-- abc
98*0Sstevel@tonic-gateuse warnings 'syntax' ;
99*0Sstevel@tonic-gate$a =+ 1 ;
100*0Sstevel@tonic-gate1;
101*0Sstevel@tonic-gate--FILE--
102*0Sstevel@tonic-gateuse warnings FATAL => 'uninitialized' ;
103*0Sstevel@tonic-gaterequire "./abc";
104*0Sstevel@tonic-gatemy $a ; chop $a ;
105*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
106*0Sstevel@tonic-gateEXPECT
107*0Sstevel@tonic-gateReversed += operator at ./abc line 2.
108*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 3.
109*0Sstevel@tonic-gate########
110*0Sstevel@tonic-gate
111*0Sstevel@tonic-gate--FILE-- abc.pm
112*0Sstevel@tonic-gateuse warnings 'syntax' ;
113*0Sstevel@tonic-gate$a =+ 1 ;
114*0Sstevel@tonic-gate1;
115*0Sstevel@tonic-gate--FILE--
116*0Sstevel@tonic-gateuse warnings FATAL => 'uninitialized' ;
117*0Sstevel@tonic-gateuse abc;
118*0Sstevel@tonic-gatemy $a ; chop $a ;
119*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
120*0Sstevel@tonic-gateEXPECT
121*0Sstevel@tonic-gateReversed += operator at abc.pm line 2.
122*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 3.
123*0Sstevel@tonic-gate########
124*0Sstevel@tonic-gate
125*0Sstevel@tonic-gate# Check scope of pragma with eval
126*0Sstevel@tonic-gateno warnings ;
127*0Sstevel@tonic-gateeval {
128*0Sstevel@tonic-gate    use warnings FATAL => 'uninitialized' ;
129*0Sstevel@tonic-gate    my $b ; chop $b ;
130*0Sstevel@tonic-gate}; print STDERR "-- $@" ;
131*0Sstevel@tonic-gatemy $b ; chop $b ;
132*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
133*0Sstevel@tonic-gateEXPECT
134*0Sstevel@tonic-gate-- Use of uninitialized value in scalar chop at - line 6.
135*0Sstevel@tonic-gateThe End.
136*0Sstevel@tonic-gate########
137*0Sstevel@tonic-gate
138*0Sstevel@tonic-gate# Check scope of pragma with eval
139*0Sstevel@tonic-gateuse warnings FATAL => 'uninitialized' ;
140*0Sstevel@tonic-gateeval {
141*0Sstevel@tonic-gate    my $b ; chop $b ;
142*0Sstevel@tonic-gate}; print STDERR "-- $@" ;
143*0Sstevel@tonic-gatemy $b ; chop $b ;
144*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
145*0Sstevel@tonic-gateEXPECT
146*0Sstevel@tonic-gate-- Use of uninitialized value in scalar chop at - line 5.
147*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 7.
148*0Sstevel@tonic-gate########
149*0Sstevel@tonic-gate
150*0Sstevel@tonic-gate# Check scope of pragma with eval
151*0Sstevel@tonic-gateuse warnings FATAL => 'uninitialized' ;
152*0Sstevel@tonic-gateeval {
153*0Sstevel@tonic-gate    no warnings ;
154*0Sstevel@tonic-gate    my $b ; chop $b ;
155*0Sstevel@tonic-gate}; print STDERR $@ ;
156*0Sstevel@tonic-gatemy $b ; chop $b ;
157*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
158*0Sstevel@tonic-gateEXPECT
159*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 8.
160*0Sstevel@tonic-gate########
161*0Sstevel@tonic-gate
162*0Sstevel@tonic-gate# Check scope of pragma with eval
163*0Sstevel@tonic-gateno warnings ;
164*0Sstevel@tonic-gateeval {
165*0Sstevel@tonic-gate    use warnings FATAL => 'syntax' ;
166*0Sstevel@tonic-gate    $a =+ 1 ;
167*0Sstevel@tonic-gate}; print STDERR "-- $@" ;
168*0Sstevel@tonic-gate$a =+ 1 ;
169*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
170*0Sstevel@tonic-gateEXPECT
171*0Sstevel@tonic-gateReversed += operator at - line 6.
172*0Sstevel@tonic-gate########
173*0Sstevel@tonic-gate
174*0Sstevel@tonic-gate# Check scope of pragma with eval
175*0Sstevel@tonic-gateuse warnings FATAL => 'syntax' ;
176*0Sstevel@tonic-gateeval {
177*0Sstevel@tonic-gate    $a =+ 1 ;
178*0Sstevel@tonic-gate}; print STDERR "-- $@" ;
179*0Sstevel@tonic-gate$a =+ 1 ;
180*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
181*0Sstevel@tonic-gateEXPECT
182*0Sstevel@tonic-gateReversed += operator at - line 5.
183*0Sstevel@tonic-gate########
184*0Sstevel@tonic-gate
185*0Sstevel@tonic-gate# Check scope of pragma with eval
186*0Sstevel@tonic-gateuse warnings FATAL => 'syntax' ;
187*0Sstevel@tonic-gateeval {
188*0Sstevel@tonic-gate    no warnings ;
189*0Sstevel@tonic-gate    $a =+ 1 ;
190*0Sstevel@tonic-gate}; print STDERR $@ ;
191*0Sstevel@tonic-gate$a =+ 1 ;
192*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
193*0Sstevel@tonic-gateEXPECT
194*0Sstevel@tonic-gateReversed += operator at - line 8.
195*0Sstevel@tonic-gate########
196*0Sstevel@tonic-gate
197*0Sstevel@tonic-gate# Check scope of pragma with eval
198*0Sstevel@tonic-gateno warnings ;
199*0Sstevel@tonic-gateeval {
200*0Sstevel@tonic-gate    use warnings FATAL => 'syntax' ;
201*0Sstevel@tonic-gate}; print STDERR $@ ;
202*0Sstevel@tonic-gate$a =+ 1 ;
203*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
204*0Sstevel@tonic-gateEXPECT
205*0Sstevel@tonic-gateThe End.
206*0Sstevel@tonic-gate########
207*0Sstevel@tonic-gate
208*0Sstevel@tonic-gate# Check scope of pragma with eval
209*0Sstevel@tonic-gateno warnings ;
210*0Sstevel@tonic-gateeval q[
211*0Sstevel@tonic-gate    use warnings FATAL => 'uninitialized' ;
212*0Sstevel@tonic-gate    my $b ; chop $b ;
213*0Sstevel@tonic-gate]; print STDERR "-- $@";
214*0Sstevel@tonic-gatemy $b ; chop $b ;
215*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
216*0Sstevel@tonic-gateEXPECT
217*0Sstevel@tonic-gate-- Use of uninitialized value in scalar chop at (eval 1) line 3.
218*0Sstevel@tonic-gateThe End.
219*0Sstevel@tonic-gate########
220*0Sstevel@tonic-gate
221*0Sstevel@tonic-gate# Check scope of pragma with eval
222*0Sstevel@tonic-gateuse warnings FATAL => 'uninitialized' ;
223*0Sstevel@tonic-gateeval '
224*0Sstevel@tonic-gate    my $b ; chop $b ;
225*0Sstevel@tonic-gate'; print STDERR "-- $@" ;
226*0Sstevel@tonic-gatemy $b ; chop $b ;
227*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
228*0Sstevel@tonic-gateEXPECT
229*0Sstevel@tonic-gate-- Use of uninitialized value in scalar chop at (eval 1) line 2.
230*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 7.
231*0Sstevel@tonic-gate########
232*0Sstevel@tonic-gate
233*0Sstevel@tonic-gate# Check scope of pragma with eval
234*0Sstevel@tonic-gateuse warnings FATAL => 'uninitialized' ;
235*0Sstevel@tonic-gateeval '
236*0Sstevel@tonic-gate    no warnings ;
237*0Sstevel@tonic-gate    my $b ; chop $b ;
238*0Sstevel@tonic-gate'; print STDERR $@ ;
239*0Sstevel@tonic-gatemy $b ; chop $b ;
240*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
241*0Sstevel@tonic-gateEXPECT
242*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 8.
243*0Sstevel@tonic-gate########
244*0Sstevel@tonic-gate
245*0Sstevel@tonic-gate# Check scope of pragma with eval
246*0Sstevel@tonic-gateno warnings ;
247*0Sstevel@tonic-gateeval q[
248*0Sstevel@tonic-gate    use warnings FATAL => 'syntax' ;
249*0Sstevel@tonic-gate    $a =+ 1 ;
250*0Sstevel@tonic-gate]; print STDERR "-- $@";
251*0Sstevel@tonic-gate$a =+ 1 ;
252*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
253*0Sstevel@tonic-gateEXPECT
254*0Sstevel@tonic-gate-- Reversed += operator at (eval 1) line 3.
255*0Sstevel@tonic-gateThe End.
256*0Sstevel@tonic-gate########
257*0Sstevel@tonic-gate
258*0Sstevel@tonic-gate# Check scope of pragma with eval
259*0Sstevel@tonic-gateuse warnings FATAL => 'syntax' ;
260*0Sstevel@tonic-gateeval '
261*0Sstevel@tonic-gate    $a =+ 1 ;
262*0Sstevel@tonic-gate'; print STDERR "-- $@";
263*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
264*0Sstevel@tonic-gateEXPECT
265*0Sstevel@tonic-gate-- Reversed += operator at (eval 1) line 2.
266*0Sstevel@tonic-gateThe End.
267*0Sstevel@tonic-gate########
268*0Sstevel@tonic-gate
269*0Sstevel@tonic-gate# Check scope of pragma with eval
270*0Sstevel@tonic-gateuse warnings FATAL => 'syntax' ;
271*0Sstevel@tonic-gateeval '
272*0Sstevel@tonic-gate    no warnings ;
273*0Sstevel@tonic-gate    $a =+ 1 ;
274*0Sstevel@tonic-gate'; print STDERR "-- $@";
275*0Sstevel@tonic-gate$a =+ 1 ;
276*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
277*0Sstevel@tonic-gateEXPECT
278*0Sstevel@tonic-gateReversed += operator at - line 8.
279*0Sstevel@tonic-gate########
280*0Sstevel@tonic-gate
281*0Sstevel@tonic-gateuse warnings 'void' ;
282*0Sstevel@tonic-gate
283*0Sstevel@tonic-gatetime ;
284*0Sstevel@tonic-gate
285*0Sstevel@tonic-gate{
286*0Sstevel@tonic-gate    use warnings FATAL => qw(void) ;
287*0Sstevel@tonic-gate    length "abc" ;
288*0Sstevel@tonic-gate}
289*0Sstevel@tonic-gate
290*0Sstevel@tonic-gatejoin "", 1,2,3 ;
291*0Sstevel@tonic-gate
292*0Sstevel@tonic-gateprint "done\n" ;
293*0Sstevel@tonic-gateEXPECT
294*0Sstevel@tonic-gateUseless use of time in void context at - line 4.
295*0Sstevel@tonic-gateUseless use of length in void context at - line 8.
296*0Sstevel@tonic-gate########
297*0Sstevel@tonic-gate
298*0Sstevel@tonic-gateuse warnings ;
299*0Sstevel@tonic-gate
300*0Sstevel@tonic-gatetime ;
301*0Sstevel@tonic-gate
302*0Sstevel@tonic-gate{
303*0Sstevel@tonic-gate    use warnings FATAL => qw(void) ;
304*0Sstevel@tonic-gate    length "abc" ;
305*0Sstevel@tonic-gate}
306*0Sstevel@tonic-gate
307*0Sstevel@tonic-gatejoin "", 1,2,3 ;
308*0Sstevel@tonic-gate
309*0Sstevel@tonic-gateprint "done\n" ;
310*0Sstevel@tonic-gateEXPECT
311*0Sstevel@tonic-gateUseless use of time in void context at - line 4.
312*0Sstevel@tonic-gateUseless use of length in void context at - line 8.
313*0Sstevel@tonic-gate########
314*0Sstevel@tonic-gate
315*0Sstevel@tonic-gateuse warnings FATAL => 'all';
316*0Sstevel@tonic-gate{
317*0Sstevel@tonic-gate    no warnings;
318*0Sstevel@tonic-gate    my $b ; chop $b;
319*0Sstevel@tonic-gate    {
320*0Sstevel@tonic-gate        use warnings ;
321*0Sstevel@tonic-gate        my $b ; chop $b;
322*0Sstevel@tonic-gate    }
323*0Sstevel@tonic-gate}
324*0Sstevel@tonic-gatemy $b ; chop $b;
325*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
326*0Sstevel@tonic-gateEXPECT
327*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 8.
328*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 11.
329*0Sstevel@tonic-gate########
330*0Sstevel@tonic-gate
331*0Sstevel@tonic-gateuse warnings FATAL => 'all';
332*0Sstevel@tonic-gate{
333*0Sstevel@tonic-gate    no warnings FATAL => 'all';
334*0Sstevel@tonic-gate    my $b ; chop $b;
335*0Sstevel@tonic-gate    {
336*0Sstevel@tonic-gate        use warnings ;
337*0Sstevel@tonic-gate        my $b ; chop $b;
338*0Sstevel@tonic-gate    }
339*0Sstevel@tonic-gate}
340*0Sstevel@tonic-gatemy $b ; chop $b;
341*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
342*0Sstevel@tonic-gateEXPECT
343*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 8.
344*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 11.
345*0Sstevel@tonic-gate########
346*0Sstevel@tonic-gate
347*0Sstevel@tonic-gateuse warnings FATAL => 'all';
348*0Sstevel@tonic-gate{
349*0Sstevel@tonic-gate    no warnings 'syntax';
350*0Sstevel@tonic-gate    {
351*0Sstevel@tonic-gate        use warnings ;
352*0Sstevel@tonic-gate        my $b ; chop $b;
353*0Sstevel@tonic-gate    }
354*0Sstevel@tonic-gate}
355*0Sstevel@tonic-gatemy $b ; chop $b;
356*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
357*0Sstevel@tonic-gateEXPECT
358*0Sstevel@tonic-gateUse of uninitialized value in scalar chop at - line 7.
359*0Sstevel@tonic-gate########
360*0Sstevel@tonic-gate
361*0Sstevel@tonic-gateuse warnings FATAL => 'syntax', NONFATAL => 'void' ;
362*0Sstevel@tonic-gate
363*0Sstevel@tonic-gatelength "abc";
364*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
365*0Sstevel@tonic-gateEXPECT
366*0Sstevel@tonic-gateUseless use of length in void context at - line 4.
367*0Sstevel@tonic-gateThe End.
368*0Sstevel@tonic-gate########
369*0Sstevel@tonic-gate
370*0Sstevel@tonic-gateuse warnings FATAL => 'all', NONFATAL => 'void' ;
371*0Sstevel@tonic-gate
372*0Sstevel@tonic-gatelength "abc";
373*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
374*0Sstevel@tonic-gateEXPECT
375*0Sstevel@tonic-gateUseless use of length in void context at - line 4.
376*0Sstevel@tonic-gateThe End.
377*0Sstevel@tonic-gate########
378*0Sstevel@tonic-gate
379*0Sstevel@tonic-gateuse warnings FATAL => 'all', NONFATAL => 'void' ;
380*0Sstevel@tonic-gate
381*0Sstevel@tonic-gatemy $a ; chomp $a;
382*0Sstevel@tonic-gatelength "abc";
383*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
384*0Sstevel@tonic-gateEXPECT
385*0Sstevel@tonic-gateUseless use of length in void context at - line 5.
386*0Sstevel@tonic-gateUse of uninitialized value in scalar chomp at - line 4.
387*0Sstevel@tonic-gate########
388*0Sstevel@tonic-gate
389*0Sstevel@tonic-gateuse warnings FATAL => 'void', NONFATAL => 'void' ;
390*0Sstevel@tonic-gate
391*0Sstevel@tonic-gatelength "abc";
392*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
393*0Sstevel@tonic-gateEXPECT
394*0Sstevel@tonic-gateUseless use of length in void context at - line 4.
395*0Sstevel@tonic-gateThe End.
396*0Sstevel@tonic-gate########
397*0Sstevel@tonic-gate
398*0Sstevel@tonic-gateuse warnings NONFATAL => 'void', FATAL => 'void' ;
399*0Sstevel@tonic-gate
400*0Sstevel@tonic-gatelength "abc";
401*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
402*0Sstevel@tonic-gateEXPECT
403*0Sstevel@tonic-gateUseless use of length in void context at - line 4.
404*0Sstevel@tonic-gate########
405*0Sstevel@tonic-gate
406*0Sstevel@tonic-gateuse warnings FATAL => 'all', NONFATAL => 'io';
407*0Sstevel@tonic-gateno warnings 'once';
408*0Sstevel@tonic-gate
409*0Sstevel@tonic-gateopen(F, "<true\ncd");
410*0Sstevel@tonic-gateclose "fred" ;
411*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
412*0Sstevel@tonic-gateEXPECT
413*0Sstevel@tonic-gateUnsuccessful open on filename containing newline at - line 5.
414*0Sstevel@tonic-gateclose() on unopened filehandle fred at - line 6.
415*0Sstevel@tonic-gateThe End.
416*0Sstevel@tonic-gate########
417*0Sstevel@tonic-gate
418*0Sstevel@tonic-gateuse warnings FATAL => 'all', NONFATAL => 'io', FATAL => 'unopened' ;
419*0Sstevel@tonic-gateno warnings 'once';
420*0Sstevel@tonic-gate
421*0Sstevel@tonic-gateopen(F, "<true\ncd");
422*0Sstevel@tonic-gateclose "fred" ;
423*0Sstevel@tonic-gateprint STDERR "The End.\n" ;
424*0Sstevel@tonic-gateEXPECT
425*0Sstevel@tonic-gateUnsuccessful open on filename containing newline at - line 5.
426*0Sstevel@tonic-gateclose() on unopened filehandle fred at - line 6.
427