X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFile%2FPath.t;h=3ecd8f646dbe1cd1e8e98c7667f07627b75cc098;hb=e63b33793c3cf76a134a6446d1f83479e030a15f;hp=d4bdac5c5fbc2c25673a6f592ee6627ba82769c2;hpb=30cf951a665f08904ec400523b649ddb1382c0fe;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/File/Path.t b/lib/File/Path.t index d4bdac5..3ecd8f6 100755 --- a/lib/File/Path.t +++ b/lib/File/Path.t @@ -2,7 +2,7 @@ use strict; -use Test::More tests => 114; +use Test::More tests => 120; use Config; BEGIN { @@ -546,6 +546,27 @@ SKIP: { } } -rmtree($tmp_base, {result => \$list} ); -is(ref($list), 'ARRAY', "received a final list of results"); -ok( !(-d $tmp_base), "test base directory gone" ); +SKIP: { + my $nr_tests = 6; + my $cwd = getcwd() or skip "failed to getcwd: $!", $nr_tests; + rmtree($tmp_base, {result => \$list} ); + is(ref($list), 'ARRAY', "received a final list of results"); + ok( !(-d $tmp_base), "test base directory gone" ); + + my $p = getcwd(); + my $x = "x$$"; + my $xx = $x . "x"; + + # setup + ok(mkpath($xx)); + ok(chdir($xx)); + END { + ok(chdir($p)); + ok(rmtree($xx)); + } + + # create and delete directory + my $px = catdir($p, $x); + ok(mkpath($px)); + ok(rmtree($px), "rmtree"); # fails in File-Path-2.07 +}