IRIX failure with long doubles.
[p5sagit/p5-mst-13.2.git] / t / op / stat.t
index 2f38719..791f7e5 100755 (executable)
@@ -9,7 +9,7 @@ BEGIN {
 use Config;
 use File::Spec;
 
-plan tests => 74;
+plan tests => 73;
 
 my $Perl = which_perl();
 
@@ -106,6 +106,8 @@ SKIP: {
 # Check if you are on a tmpfs of some sort.  Building in /tmp sometimes
 # has this problem.  Also building on the ClearCase VOBS filesystem may
 # cause this failure.
+# Darwins UFS doesn't have a ctime concept, and thus is
+# expected to fail this test.
 DIAG
         }
     }
@@ -334,14 +336,14 @@ SKIP: {
     ok(! -B FOO,    '   !-B');
 
     $_ = <FOO>;
-    ok(/perl/,      'after readline');
+    like($_, qr/perl/, 'after readline');
     ok(-T FOO,      '   still -T');
     ok(! -B FOO,    '   still -B');
     close(FOO);
 
     open(FOO,'op/stat.t');
     $_ = <FOO>;
-    ok(/perl/,      'reopened and after readline');
+    like($_, qr/perl/,      'reopened and after readline');
     ok(-T FOO,      '   still -T');
     ok(! -B FOO,    '   still !-B');
 
@@ -378,20 +380,16 @@ my @r = \stat(".");
 is(scalar @r, 13,   'stat returns full 13 elements');
 
 SKIP: {
-    skip "No lstat", 2 unless $Config{d_lstat};
+    skip "No lstat", 4 unless $Config{d_lstat};
 
     stat $0;
     eval { lstat _ };
-    ok( $@ =~ /^The stat preceding lstat\(\) wasn't an lstat/,
+    like( $@, qr/^The stat preceding lstat\(\) wasn't an lstat/,
        'lstat _ croaks after stat' );
     eval { -l _ };
-    ok( $@ =~ /^The stat preceding -l _ wasn't an lstat/,
+    like( $@, qr/^The stat preceding -l _ wasn't an lstat/,
        '-l _ croaks after stat' );
 
-    eval { lstat STDIN };
-    ok( $@ =~ /^The stat preceding lstat\(\) wasn't an lstat/,
-       'lstat FILEHANDLE croaks' );
-
     # bug id 20020124.004
     # If we have d_lstat, we should have symlink()
     my $linkname = 'dolzero';
@@ -399,10 +397,10 @@ SKIP: {
     lstat $linkname;
     -T _;
     eval { lstat _ };
-    ok( $@ =~ /^The stat preceding lstat\(\) wasn't an lstat/,
+    like( $@, qr/^The stat preceding lstat\(\) wasn't an lstat/,
        'lstat croaks after -T _' );
     eval { -l _ };
-    ok( $@ =~ /^The stat preceding -l _ wasn't an lstat/,
+    like( $@, qr/^The stat preceding -l _ wasn't an lstat/,
        '-l _ croaks after -T _' );
     unlink $linkname or print "# unlink $linkname failed: $!\n";
 }