[perl #37091] File::Path::mkpath resets errno
[p5sagit/p5-mst-13.2.git] / lib / File / CheckTree.t
index 58cca3a..0257f4e 100755 (executable)
@@ -18,7 +18,7 @@ use File::Spec;          # used to get absolute paths
 # Will move up one level to make it easier to generate
 # reliable pathnames for testing File::CheckTree
 
-chdir('..') or die "cannot change to parent of t/ directory: $!";
+chdir(File::Spec->updir) or die "cannot change to parent of t/ directory: $!";
 
 
 #### TEST 1 -- No warnings ####
@@ -116,7 +116,7 @@ chdir('..') 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, "@_" };