xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/t/op/fh.t (revision 0:68f95e015346)
1*0Sstevel@tonic-gate#!./perl
2*0Sstevel@tonic-gate
3*0Sstevel@tonic-gateBEGIN {
4*0Sstevel@tonic-gate    chdir 't';
5*0Sstevel@tonic-gate    @INC = '../lib';
6*0Sstevel@tonic-gate    require './test.pl';
7*0Sstevel@tonic-gate}
8*0Sstevel@tonic-gate
9*0Sstevel@tonic-gateplan tests => 8;
10*0Sstevel@tonic-gate
11*0Sstevel@tonic-gate# symbolic filehandles should only result in glob entries with FH constructors
12*0Sstevel@tonic-gate
13*0Sstevel@tonic-gate$|=1;
14*0Sstevel@tonic-gatemy $a = "SYM000";
15*0Sstevel@tonic-gateok(!defined(fileno($a)));
16*0Sstevel@tonic-gateok(!defined *{$a});
17*0Sstevel@tonic-gate
18*0Sstevel@tonic-gateselect select $a;
19*0Sstevel@tonic-gateok(defined *{$a});
20*0Sstevel@tonic-gate
21*0Sstevel@tonic-gate$a++;
22*0Sstevel@tonic-gateok(!close $a);
23*0Sstevel@tonic-gateok(!defined *{$a});
24*0Sstevel@tonic-gate
25*0Sstevel@tonic-gateok(open($a, ">&STDOUT"));
26*0Sstevel@tonic-gateok(defined *{$a});
27*0Sstevel@tonic-gate
28*0Sstevel@tonic-gateok(close $a);
29*0Sstevel@tonic-gate
30