Skip to content

Commit

Permalink
Merge e04a02a into bf0d074
Browse files Browse the repository at this point in the history
  • Loading branch information
manwar committed Jun 25, 2018
2 parents bf0d074 + e04a02a commit 5c6ed2c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
16 changes: 12 additions & 4 deletions t/00_prereqs.t
Expand Up @@ -49,9 +49,17 @@ foreach my $phase (qw/configure build runtime test/, (-d "xt" ? "develop" : ()))
if (eval { require_ok($module) unless $module eq 'perl'; 1 })
{
my $version = $module eq 'perl' ? $] : $module->VERSION;
$len{have} < length($version) and $len{have} = length($version);
my $ok = ok($reqs->accepts_module($module, $version), "$module matches required $version");
my $status = $ok ? "ok" : "not ok";
my $status;
if (defined $version)
{
$len{have} < length($version) and $len{have} = length($version);
my $ok = ok($reqs->accepts_module($module, $version), "$module matches required $version");
$status = $ok ? "ok" : "not ok";
}
else
{
$status = "not ok";
}
$report{$phase}{$severity}{$module} = {
want => $want,
have => $version,
Expand Down Expand Up @@ -86,7 +94,7 @@ foreach my $phase (qw/configure build runtime test/, (-d "xt" ? "develop" : ()))
foreach my $module (sort keys %{$report{$phase}{$severity}})
{
my ($have, $want, $status) = @{$report{$phase}{$severity}{$module}}{qw(have want status)};
diag(sprintf($fmt_str, $module, $have, $want, $status));
diag(sprintf($fmt_str, $module, $have || '', $want, $status));
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion t/06_old.t
Expand Up @@ -25,7 +25,8 @@ is(File::ShareDir::_DIST('ShareDir-TestClass'), 'ShareDir-TestClass', '_DIST

remove_tree($testautolib);
make_path($testsharedirold, {mode => 0700});
open(my $fh, ">", File::Spec->catfile($testsharedirold, qw(sample.txt)));
open(my $fh, ">", File::Spec->catfile($testsharedirold, qw(sample.txt)))
or die "Can't write to [$testsharedirold]: $!";
close($fh);

my $module_dir = module_dir('ShareDir::TestClass');
Expand Down

0 comments on commit 5c6ed2c

Please sign in to comment.