fix ops that are not filehandle constructors to not create GV if it
[p5sagit/p5-mst-13.2.git] / t / op / fh.t
1 #!./perl
2
3 print "1..6\n";
4
5 my $test = 0;
6
7 # symbolic filehandles should only result in glob entries with FH constructors
8
9 my $a = "SYM000";
10 print "not " if defined(fileno($a)) or defined *{$a};
11 ++$test; print "ok $test\n";
12
13 select select $a;
14 print "not " if defined *{$a};
15 ++$test; print "ok $test\n";
16
17 print "not " if close $a or defined *{$a};
18 ++$test; print "ok $test\n";
19
20 print "not " unless open($a, ">&STDOUT") and defined *{$a};
21 ++$test; print $a "ok $test\n";
22
23 print "not " unless close $a;
24 ++$test; print $a "not "; print "ok $test\n";