From 21d27c4b0709e07b463bc79411fb67dac9694fc5 Mon Sep 17 00:00:00 2001 From: shawnlaffan Date: Sat, 1 Jun 2024 11:16:48 +1000 Subject: [PATCH] Tests: better feedback when alien is optional --- t/00-load.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/00-load.t b/t/00-load.t index abba659a1..7c5a1157a 100644 --- a/t/00-load.t +++ b/t/00-load.t @@ -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",