about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-14 00:25:03 +0000
committerEric Wong <e@yhbt.net>2020-06-15 06:07:52 +0000
commit4042599799a3706d1b1c0589675b07cab610505a (patch)
treeca8cbd49ecbf6dd11ca4fd20e9fa275ec62a3886 /t
parentfc6c7191daf71b8b1f6b45638ffcb1c6b2057636 (diff)
downloadpublic-inbox-4042599799a3706d1b1c0589675b07cab610505a.tar.gz
IMAP requires either the Email::Address::XS or Mail::Address
package (part of perl-MailTools RPM or libmailtools-perl deb);
and Email::Address::XS is not officially packaged for some older
distros, most notably CentOS 7.x.
Diffstat (limited to 't')
-rw-r--r--t/imap.t6
-rw-r--r--t/imapd-tls.t3
-rw-r--r--t/imapd.t3
3 files changed, 7 insertions, 5 deletions
diff --git a/t/imap.t b/t/imap.t
index 0700f578..83adf553 100644
--- a/t/imap.t
+++ b/t/imap.t
@@ -4,10 +4,10 @@
 # unit tests (no network) for IMAP, see t/imapd.t for end-to-end tests
 use strict;
 use Test::More;
-use PublicInbox::IMAP;
-use PublicInbox::IMAPD;
 use PublicInbox::TestCommon;
-require_mods(qw(DBD::SQLite));
+require_mods(qw(DBD::SQLite Email::Address::XS||Mail::Address));
+require_ok 'PublicInbox::IMAP';
+require_ok 'PublicInbox::IMAPD';
 require_git 2.6;
 use POSIX qw(strftime);
 
diff --git a/t/imapd-tls.t b/t/imapd-tls.t
index 5352d100..f81959a5 100644
--- a/t/imapd-tls.t
+++ b/t/imapd-tls.t
@@ -6,7 +6,8 @@ use Test::More;
 use Socket qw(IPPROTO_TCP SOL_SOCKET);
 use PublicInbox::TestCommon;
 # IO::Poll is part of the standard library, but distros may split it off...
-require_mods(qw(DBD::SQLite IO::Socket::SSL Mail::IMAPClient IO::Poll));
+require_mods(qw(DBD::SQLite IO::Socket::SSL Mail::IMAPClient IO::Poll
+        Email::Address::XS||Mail::Address));
 my $imap_client = 'Mail::IMAPClient';
 $imap_client->can('starttls') or
         plan skip_all => 'Mail::IMAPClient does not support TLS';
diff --git a/t/imapd.t b/t/imapd.t
index f5ca8b7e..0f48e905 100644
--- a/t/imapd.t
+++ b/t/imapd.t
@@ -8,7 +8,8 @@ use Time::HiRes ();
 use PublicInbox::TestCommon;
 use PublicInbox::Config;
 use PublicInbox::Spawn qw(which);
-require_mods(qw(DBD::SQLite Mail::IMAPClient Mail::IMAPClient::BodyStructure));
+require_mods(qw(DBD::SQLite Mail::IMAPClient Mail::IMAPClient::BodyStructure
+        Email::Address::XS||Mail::Address));
 my $imap_client = 'Mail::IMAPClient';
 my $can_compress = $imap_client->can('compress');
 if ($can_compress) { # hope this gets fixed upstream, soon