Make the changes MacOS-specific.
Jarkko Hietaniemi [Sat, 1 Jun 2002 04:05:35 +0000 (04:05 +0000)]
p4raw-id: //depot/perl@16954

lib/Test/Harness/t/callback.t
lib/Test/Harness/t/strap-analyze.t
lib/Test/Harness/t/test-harness.t

index 63aaa22..6a57fd5 100644 (file)
@@ -54,7 +54,10 @@ $strap->{callback} = sub {
                             
 while( my($test, $expect) = each %samples ) {
     local @out = ();
-    $strap->analyze_file(catfile($SAMPLE_TESTS, $test));
+
+    $strap->analyze_file($^O eq 'macos' ?
+                        catfile($SAMPLE_TESTS, $test) :
+                        "$SAMPLE_TESTS/$test");
 
     is_deeply(\@out, $expect,   "$test callback");
 }
index 96b549a..59e4a5c 100644 (file)
@@ -463,7 +463,9 @@ while( my($test, $expect) = each %samples ) {
     }
 
     my $strap = Test::Harness::Straps->new;
-    my %results = $strap->analyze_file(catfile($SAMPLE_TESTS, $test));
+    my %results = $strap->analyze_file($^O eq 'macos' ?
+                                       catfile($SAMPLE_TESTS, $test) :
+                                       "$SAMPLE_TESTS/$test");
 
     is_deeply($results{details}, $expect->{details}, "$test details" );
 
index f75f379..be95a54 100644 (file)
@@ -431,7 +431,9 @@ while (my($test, $expect) = each %samples) {
         select NULL;    # _run_all_tests() isn't as quiet as it should be.
         local $SIG{__WARN__} = sub { $warning .= join '', @_; };
         ($totals, $failed) = 
-          Test::Harness::_run_all_tests(catfile($SAMPLE_TESTS, $test));
+          Test::Harness::_run_all_tests($^O eq 'macos' ?
+                                       catfile($SAMPLE_TESTS, $test) :
+                                       "$SAMPLE_TESTS/$test");
     };
     select STDOUT;