Skip to content

Commit

Permalink
Merge pull request #45 from jkeenan/cleanup-t-path-root
Browse files Browse the repository at this point in the history
rt.cpan.org # 120645: Clean up directories created during running of t/Path_root.t.
  • Loading branch information
rpcme committed Mar 27, 2017
2 parents 8eb7506 + 2367100 commit 44a6920
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion t/Path_root.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use File::Spec::Functions;

my $prereq = prereq();
plan skip_all => $prereq if defined $prereq;
plan tests => 9;
plan tests => 11;

my $pwent = max_u();
my $grent = max_g();
Expand Down Expand Up @@ -82,6 +82,15 @@ is($dir_gid, $max_gid, "... owned by group $max_gid");
);
}

{
# cleanup
my $x;
my $opts = { error => \$x };
remove_tree($tmp_base, $opts);
ok(! -d $tmp_base, "directory '$tmp_base' removed, as expected");
is(scalar(@{$x}), 0, "no error messages using remove_tree() with \$opts");
}

sub max_u {
# find the highest uid ('nobody' or similar)
my $max_uid = 0;
Expand Down

0 comments on commit 44a6920

Please sign in to comment.