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:05 +0000
committerEric Wong <e@yhbt.net>2020-06-15 06:07:55 +0000
commit16d4a34a7e796630d92949c4193db4b77bd7dd9d (patch)
tree9f9fa3a204eef173e238224419918bee2c73d63c /t
parent192dd6249c1960380241d73d099d5477028c259a (diff)
downloadpublic-inbox-16d4a34a7e796630d92949c4193db4b77bd7dd9d.tar.gz
->has_capability on Mail::IMAPClient 3.37 (tested on CentOS 7.x)
only returned boolean values, and not the value of the capability.
Diffstat (limited to 't')
-rw-r--r--t/imapd-tls.t4
-rw-r--r--t/imapd.t6
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");