This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add Rafael's 5.10 roadmap to perltodo.
[perl5.git] / t / op / fh.t
CommitLineData
35cd451c
GS
1#!./perl
2
d80ecdf8
RGS
3BEGIN {
4 chdir 't';
5 @INC = '../lib';
6 require './test.pl';
7}
35cd451c 8
d80ecdf8 9plan tests => 8;
35cd451c
GS
10
11# symbolic filehandles should only result in glob entries with FH constructors
12
648cac19 13$|=1;
35cd451c 14my $a = "SYM000";
d80ecdf8
RGS
15ok(!defined(fileno($a)));
16ok(!defined *{$a});
35cd451c
GS
17
18select select $a;
d80ecdf8 19ok(defined *{$a});
35cd451c 20
f83494b9 21$a++;
d80ecdf8
RGS
22ok(!close $a);
23ok(!defined *{$a});
35cd451c 24
d80ecdf8
RGS
25ok(open($a, ">&STDOUT"));
26ok(defined *{$a});
27
28ok(close $a);
35cd451c 29