This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Test case for C<undef %File::Glob::>
[perl5.git] / t / op / fh.t
1 #!./perl
2
3 print "1..5\n";
4
5 my $test = 0;
6
7 # symbolic filehandles should only result in glob entries with FH constructors
8
9 $|=1;
10 my $a = "SYM000";
11 print "not " if defined(fileno($a)) or defined *{$a};
12 ++$test; print "ok $test\n";
13
14 select select $a;
15 print "not " unless defined *{$a};
16 ++$test; print "ok $test\n";
17
18 $a++;
19 print "not " if close $a or defined *{$a};
20 ++$test; print "ok $test\n";
21
22 print "not " unless open($a, ">&STDOUT") and defined *{$a};
23 ++$test; print $a "ok $test\n";
24
25 print "not " unless close $a;
26 ++$test; print $a "not "; print "ok $test\n";