Mailing List Archive

svn commit: r1903369 - /spamassassin/trunk/t/relaycountry.t
Author: sidney
Date: Fri Aug 12 11:19:32 2022
New Revision: 1903369

URL: http://svn.apache.org/viewvc?rev=1903369&view=rev
Log:
Skip part of test if running in perl linked with too old libdb for this test's db file

Modified:
spamassassin/trunk/t/relaycountry.t

Modified: spamassassin/trunk/t/relaycountry.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/relaycountry.t?rev=1903369&r1=1903368&r2=1903369&view=diff
==============================================================================
--- spamassassin/trunk/t/relaycountry.t (original)
+++ spamassassin/trunk/t/relaycountry.t Fri Aug 12 11:19:32 2022
@@ -7,8 +7,13 @@ my $tests = 0;
my %has;
eval { require MaxMind::DB::Reader; $tests += 2; $has{GEOIP2} = 1 };
eval { require Geo::IP; $tests += 2; $has{GEOIP} = 1 };
-eval { require IP::Country::DB_File; $tests += 2; $has{DB_FILE} = 1 };
eval { require IP::Country::Fast; $tests += 2; $has{FAST} = 1 };
+eval { require IP::Country::DB_File;
+ if ($DB_File::db_ver > 1 and $DB_FIle::db_version > 1) {
+ $tests += 2;
+ $has{DB_FILE} = 1;
+ }
+ };

use Test::More;

@@ -74,7 +79,7 @@ if (defined $has{DB_FILE}) {
clear_pattern_counters();
}
else {
- diag "skipping IP::Country::DB_File tests (not installed)\n";
+ diag "skipping IP::Country::DB_File tests (not installed or DB_File bdb version too old)\n";
}