From: Sawyer X Date: Thu, 23 Feb 2012 13:04:07 +0000 (+0200) Subject: use Cwd (core) to allow pruning tmp dirs in test X-Git-Tag: v0.9.7~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a3a89c9406e948e8d6f54c03fdec3331cd288bd;p=p5sagit%2FApp-FatPacker.git use Cwd (core) to allow pruning tmp dirs in test --- diff --git a/t/pack.t b/t/pack.t index 4d98b0b..b08e6fc 100644 --- a/t/pack.t +++ b/t/pack.t @@ -6,6 +6,7 @@ use File::Basename; use File::Copy; use File::Path; use File::Temp; +use Cwd; BEGIN { use_ok "App::FatPacker", "" } @@ -16,6 +17,7 @@ for() { copy $_, "$tempdir/lib/$_" or die "copy failed: $!"; } +my $cwd = getcwd; chdir $tempdir; my $fp = App::FatPacker->new; @@ -34,3 +36,6 @@ require $temp_fh; no warnings 'once'; ok $t::mod::a::foo eq 'bar'; } + +# moving away from the dir so it could be deleted +chdir $cwd;