Update to Scalar-List-Utils-1.15
[p5sagit/p5-mst-13.2.git] / ext / List / Util / t / openhan.t
index 9eed5b9..0c84074 100644 (file)
@@ -13,21 +13,17 @@ BEGIN {
     }
 }
 
-
+use strict;
+use vars qw(*CLOSED);
+use Test::More tests => 4;
 use Scalar::Util qw(openhandle);
 
-print "1..4\n";
-
-print "not " unless defined &openhandle;
-print "ok 1\n";
+ok(defined &openhandle, 'defined');
 
 my $fh = \*STDERR;
-print "not " unless openhandle($fh) == $fh;
-print "ok 2\n";
+is(openhandle($fh), $fh, 'STDERR');
 
-print "not " unless fileno(openhandle(*STDERR)) == fileno(STDERR);
-print "ok 3\n";
+is(fileno(openhandle(*STDERR)), fileno(STDERR), 'fileno(STDERR)');
 
-print "not " if openhandle(CLOSED);
-print "ok 4\n";
+is(openhandle(*CLOSED), undef, 'closed');