]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/imapd-tls.t
lei add-external: completion for existing URL basenames
[public-inbox.git] / t / imapd-tls.t
index 5352d100e4b8517eba4192e894eba0b8337185b7..e40ae1e89715debce15aef9d526751a4b494b89a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -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 Parse::RecDescent));
 my $imap_client = 'Mail::IMAPClient';
 $imap_client->can('starttls') or
        plan skip_all => 'Mail::IMAPClient does not support TLS';
@@ -113,7 +114,9 @@ for my $args (
        ok(!(scalar $c->has_capability('STARTTLS')),
                'starttls not advertised with IMAPS');
        ok(!$c->starttls, "starttls fails");
-       ok($c->has_capability('COMPRESS'), 'compress advertised');
+       ok($c->has_capability('COMPRESS') ||
+               $c->has_capability('COMPRESS=DEFLATE'),
+               'compress advertised');
        ok($c->compress, 'compression enabled with IMAPS');
        ok(!$c->starttls, 'starttls still fails');
        ok($c->noop, 'noop succeeds');