Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: better feedback when alien is optional #938

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion t/00-load.t
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ my @aliens = qw /
Alien::proj Alien::libtiff Alien::spatialite
Alien::freexl
/;
my %optional = map {$_ => 1} qw /Alien::spatialite Alien::freexl/;
my $longest_name = max map {length} @aliens;
foreach my $alien (@aliens) {
eval "require $alien; 1";
if ($@) {
#diag "$alien not installed";
diag sprintf "%-${longest_name}s: not installed", $alien;
my $optional_text = $optional{$alien} ? "(optional module)" : '';
diag sprintf "%-${longest_name}s: not installed $optional_text", $alien;
next;
}
diag sprintf "%-${longest_name}s: version:%7s, install type: %s",
Expand Down
Loading