Integrate macperl patch #16868.
[p5sagit/p5-mst-13.2.git] / lib / Test / Harness / t / callback.t
index 2fc943a..65de524 100644 (file)
@@ -10,7 +10,11 @@ BEGIN {
     }
 }
 
-my $SAMPLE_TESTS = $ENV{PERL_CORE} ? 'lib/sample-tests' : 't/sample-tests';
+use File::Spec::Functions;
+
+my $SAMPLE_TESTS = $ENV{PERL_CORE}
+    ? catdir(curdir(), 'lib', 'sample-tests')
+    : catdir(curdir(), 't', 'sample-tests');
 
 use Test::More;
 
@@ -49,7 +53,7 @@ $strap->{callback} = sub {
                             
 while( my($test, $expect) = each %samples ) {
     local @out = ();
-    $strap->analyze_file("$SAMPLE_TESTS/$test");
+    $strap->analyze_file(catfile($SAMPLE_TESTS, $test));
 
     is_deeply(\@out, $expect,   "$test callback");
 }