Math::BigInt v1.87 take 6
[p5sagit/p5-mst-13.2.git] / lib / File / CheckTree.t
index ae5a311..e4491d4 100755 (executable)
@@ -11,6 +11,16 @@ BEGIN { plan tests => 6 }
 
 use strict;
 
+BEGIN {
+# Cwd::cwd does an implicit "require Win32", but
+# the ../lib directory in @INC will no longer work once
+# we chdir() out of the "t" directory.
+    if ($^O eq 'MSWin32') {
+       require Win32;
+       Win32->import();
+    }
+}
+
 use File::CheckTree;
 use File::Spec;          # used to get absolute paths
 
@@ -116,7 +126,7 @@ chdir(File::Spec->updir) or die "cannot change to parent of t/ directory: $!";
 # cd directive followed by relative paths, followed by full paths
 {
     my ($num_warnings, @warnings, $path_to_libFile, $path_to_dist);
-    $path_to_libFile = File::Spec->rel2abs('lib/File');
+    $path_to_libFile = File::Spec->rel2abs(File::Spec->catdir('lib','File'));
     $path_to_dist    = File::Spec->rel2abs(File::Spec->curdir);
 
     local $SIG{__WARN__} = sub { push @warnings, "@_" };