summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-01-16 21:17:14 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-01-16 21:17:14 +0000
commitd80ecdf83d5183a6fb7318bbb104963c17b122a5 (patch)
tree09ccd0c46e5e81adba2ee6f64f9a53816fc026b0
parentc760c918c71b4e55dc300234d0a8679a6bdf1e3c (diff)
downloadperl-d80ecdf83d5183a6fb7318bbb104963c17b122a5.tar.gz
Integrate #18447 from maint-5.8 :
test.pl-ise t/op/fh.t. p4raw-id: //depot/perl@18500 p4raw-integrated: from //depot/maint-5.8/perl@18499 'copy in' t/op/fh.t (@17645..)
-rwxr-xr-xt/op/fh.t27
1 files changed, 15 insertions, 12 deletions
diff --git a/t/op/fh.t b/t/op/fh.t
index 86e405a992..16ba186a91 100755
--- a/t/op/fh.t
+++ b/t/op/fh.t
@@ -1,26 +1,29 @@
#!./perl
-print "1..5\n";
+BEGIN {
+ chdir 't';
+ @INC = '../lib';
+ require './test.pl';
+}
-my $test = 0;
+plan tests => 8;
# symbolic filehandles should only result in glob entries with FH constructors
$|=1;
my $a = "SYM000";
-print "not " if defined(fileno($a)) or defined *{$a};
-++$test; print "ok $test\n";
+ok(!defined(fileno($a)));
+ok(!defined *{$a});
select select $a;
-print "not " unless defined *{$a};
-++$test; print "ok $test\n";
+ok(defined *{$a});
$a++;
-print "not " if close $a or defined *{$a};
-++$test; print "ok $test\n";
+ok(!close $a);
+ok(!defined *{$a});
-print "not " unless open($a, ">&STDOUT") and defined *{$a};
-++$test; print $a "ok $test\n";
+ok(open($a, ">&STDOUT"));
+ok(defined *{$a});
+
+ok(close $a);
-print "not " unless close $a;
-++$test; print $a "not "; print "ok $test\n";