->has_capability on Mail::IMAPClient 3.37 (tested on CentOS 7.x)
only returned boolean values, and not the value of the capability.
---
t/imapd-tls.t | 4 +++-
t/imapd.t | 6 +++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/t/imapd-tls.t b/t/imapd-tls.t
index f81959a5..6b3e1797 100644
--- a/t/imapd-tls.t
+++ b/t/imapd-tls.t
@@ -114,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');
diff --git a/t/imapd.t b/t/imapd.t
index 0f48e905..aba3ed82 100644
--- a/t/imapd.t
+++ b/t/imapd.t
@@ -217,8 +217,8 @@ for my $r ('1:*', '1') {
is(lc($bs->bodytype), 'text', '->bodytype');
is(lc($bs->bodyenc), '8bit', '->bodyenc');
}
-
-is_deeply([$mic->has_capability('COMPRESS')], ['DEFLATE'], 'deflate cap');
+ok($mic->has_capability('COMPRESS') ||
+ $mic->has_capability('COMPRESS=DEFLATE'), 'deflate cap');
SKIP: {
skip 'Mail::IMAPClient too old for ->compress', 2 if !$can_compress;
my $c = $imap_client->new(%mic_opt);
@@ -243,7 +243,7 @@ $pi_config->each_inbox(sub {
my $mb = "$ng.$first_range";
my $uidnext = $mic->uidnext($mb); # we'll fetch BODYSTRUCTURE on this
ok($uidnext, 'got uidnext for later fetch');
- is_deeply([$mic->has_capability('IDLE')], ['IDLE'], "IDLE capa $name");
+ ok($mic->has_capability('IDLE'), "IDLE capa $name");
ok(!$mic->idle, "IDLE fails w/o SELECT/EXAMINE $name");
ok($mic->examine($mb), "EXAMINE $ng succeeds");
ok(my $idle_tag = $mic->idle, "IDLE succeeds on $ng");
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/