Integrate macperl patches #16926 and #16938;
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / Command.t
index 01d0186..2e0e08f 100644 (file)
@@ -41,8 +41,12 @@ BEGIN {
                }
        }
 
+
+    # % means 'match one character' on VMS.  Everything else is ?
+    my $match_char = $^O eq 'VMS' ? '%' : '?';
+       ($ARGV[0] = $file) =~ s/.\z/$match_char/;
+
        # this should find the file
-       ($ARGV[0] = $file) =~ s/.\z/\?/;
        ExtUtils::Command::expand_wildcards();
 
        is( scalar @ARGV, 1, 'found one file' );
@@ -97,12 +101,13 @@ BEGIN {
        # to the beginning of the day in Win95.
     # There's a small chance of a 1 second flutter here.
     my $stamp = (stat($ARGV[0]))[9];
-       ok( abs($now - $stamp) <= 1, 'checking modify time stamp' ) ||
-      print "# mtime == $stamp, should be $now\n";
+       cmp_ok( abs($now - $stamp), '<=', 1, 'checking modify time stamp' ) ||
+      diag "mtime == $stamp, should be $now";
 
     SKIP: {
         if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' ||
-            $^O eq 'NetWare' || $^O eq 'dos' || $^O eq 'cygwin') {
+            $^O eq 'NetWare' || $^O eq 'dos' || $^O eq 'cygwin'  ||
+            $^O eq 'MacOS') {
             skip( "different file permission semantics on $^O", 3);
         }