user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 3/3] t/imapd*.t: support older Mail::IMAPClient
  2020-06-14  0:25  5% [PATCH 0/3] IMAP fixes for older systems Eric Wong
@ 2020-06-14  0:25  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-06-14  0:25 UTC (permalink / raw)
  To: meta

->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");

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/3] IMAP fixes for older systems
@ 2020-06-14  0:25  5% Eric Wong
  2020-06-14  0:25  7% ` [PATCH 3/3] t/imapd*.t: support older Mail::IMAPClient Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-06-14  0:25 UTC (permalink / raw)
  To: meta

Eric Wong (3):
  testcommon: allow OR-ing module dependencies
  inboxidle: support Linux::Inotify2 1.x
  t/imapd*.t: support older Mail::IMAPClient

 lib/PublicInbox/InboxIdle.pm  |  5 ++++-
 lib/PublicInbox/TestCommon.pm | 11 ++++++++++-
 t/imap.t                      |  6 +++---
 t/imapd-tls.t                 |  7 +++++--
 t/imapd.t                     |  9 +++++----
 xt/imapd-mbsync-oimap.t       |  1 +
 xt/imapd-validate.t           |  2 +-
 xt/mem-imapd-tls.t            |  2 +-
 8 files changed, 30 insertions(+), 13 deletions(-)


^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-06-14  0:25  5% [PATCH 0/3] IMAP fixes for older systems Eric Wong
2020-06-14  0:25  7% ` [PATCH 3/3] t/imapd*.t: support older Mail::IMAPClient Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).