This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix spelling errors in comments.
[perl5.git] / t / op / fh.t
index d2659c3..16ba186 100755 (executable)
--- a/t/op/fh.t
+++ b/t/op/fh.t
@@ -1,24 +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 " if defined *{$a};
-++$test; print "ok $test\n";
+ok(defined *{$a});
 
-print "not " if close $a or defined *{$a};
-++$test; print "ok $test\n";
+$a++;
+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";