This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix utf char > IV_MAX on 32-bit platforms
[perl5.git] / t / op / fh.t
old mode 100755 (executable)
new mode 100644 (file)
index 16ba186..bda59c1
--- a/t/op/fh.t
+++ b/t/op/fh.t
@@ -1,9 +1,9 @@
 #!./perl
 
 BEGIN {
-    chdir 't';
-    @INC = '../lib';
+    chdir 't' if -d 't';
     require './test.pl';
+    set_up_inc('../lib');
 }
 
 plan tests => 8;
@@ -12,18 +12,18 @@ plan tests => 8;
 
 $|=1;
 my $a = "SYM000";
-ok(!defined(fileno($a)));
-ok(!defined *{$a});
+ok(!defined(fileno($a)), 'initial file handle is undefined');
+ok(!defined *{$a}, 'initial typeglob of file handle is undefined');
 
 select select $a;
-ok(defined *{$a});
+ok(defined *{$a}, 'typeglob of file handle defined after select');
 
 $a++;
-ok(!close $a);
-ok(!defined *{$a});
+ok(!close $a, 'close does not succeed with incremented file handle');
+ok(!defined *{$a}, 'typeglob of file handle not defined after increment');
 
-ok(open($a, ">&STDOUT"));
-ok(defined *{$a});
+ok(open($a, ">&STDOUT"), 'file handle used with open of standard output');
+ok(defined *{$a}, 'typeglob of file handle defined after opening standard output');
 
-ok(close $a);
+ok(close $a, 'close standard output via file handle;');