* [PATCH 3/6] tests: require Mail::IMAPClient for IMAP tests
2021-02-19 12:09 6% [PATCH 0/6] lei: start working on IMAP writes Eric Wong
@ 2021-02-19 12:09 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-02-19 12:09 UTC (permalink / raw)
To: meta
All of our current IMAP code relies on Mail::IMAPClient
at the moment, so ensure we skip those tests on systems
without that module.
---
t/lei-convert.t | 2 +-
t/lei-import-imap.t | 2 +-
t/net_reader-imap.t | 2 +-
xt/lei-auth-fail.t | 1 +
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/t/lei-convert.t b/t/lei-convert.t
index f58a0a80..29f8ba75 100644
--- a/t/lei-convert.t
+++ b/t/lei-convert.t
@@ -6,7 +6,7 @@ use PublicInbox::MboxReader;
use PublicInbox::MdirReader;
use PublicInbox::NetReader;
require_git 2.6;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Search::Xapian Mail::IMAPClient));
my ($tmpdir, $for_destroy) = tmpdir;
my $sock = tcp_server;
my $cmd = [ '-imapd', '-W0', "--stdout=$tmpdir/1", "--stderr=$tmpdir/2" ];
diff --git a/t/lei-import-imap.t b/t/lei-import-imap.t
index ee308723..a6ba805f 100644
--- a/t/lei-import-imap.t
+++ b/t/lei-import-imap.t
@@ -3,7 +3,7 @@
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict; use v5.10.1; use PublicInbox::TestCommon;
require_git 2.6;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Search::Xapian Mail::IMAPClient));
my ($ro_home, $cfg_path) = setup_public_inboxes;
my ($tmpdir, $for_destroy) = tmpdir;
my $sock = tcp_server;
diff --git a/t/net_reader-imap.t b/t/net_reader-imap.t
index eea8b0fd..694b5a37 100644
--- a/t/net_reader-imap.t
+++ b/t/net_reader-imap.t
@@ -3,7 +3,7 @@
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict; use v5.10.1; use PublicInbox::TestCommon;
require_git 2.6;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Search::Xapian Mail::IMAPClient));
my ($tmpdir, $for_destroy) = tmpdir;
my ($ro_home, $cfg_path) = setup_public_inboxes;
my $cmd = [ '-imapd', '-W0', "--stdout=$tmpdir/1", "--stderr=$tmpdir/2" ];
diff --git a/xt/lei-auth-fail.t b/xt/lei-auth-fail.t
index 5308d0f9..78f8466d 100644
--- a/xt/lei-auth-fail.t
+++ b/xt/lei-auth-fail.t
@@ -2,6 +2,7 @@
# Copyright (C) 2021 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict; use v5.10.1; use PublicInbox::TestCommon;
+require_mods(qw(Mail::IMAPClient));
# TODO: mock IMAP server which fails at authentication so we don't
# have to make external connections to test this:
^ permalink raw reply related [relevance 7%]
* [PATCH 0/6] lei: start working on IMAP writes
@ 2021-02-19 12:09 6% Eric Wong
2021-02-19 12:09 7% ` [PATCH 3/6] tests: require Mail::IMAPClient for IMAP tests Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-02-19 12:09 UTC (permalink / raw)
To: meta
Testing this will be tricky and require writable access to
an existing IMAP server via TEST_IMAP_WRITE_URL env.
I don't know if I want to do a writable IMAP server for testing
(or maybe accessible via lei somehow).
4/6 is fix for a long-standing bug carried over from Watch.pm
(well, as long as -watch has had IMAP support) which was within
the past year, but it's been a long year :<)
Eric Wong (6):
t/lei-externals: favor "-o format:$PATHNAME" over "-f"
lei_to_mail: get rid of empty _post_augment_maildir
tests: require Mail::IMAPClient for IMAP tests
net_reader: handle single-message IMAP mailboxes
net_writer: start implementing IMAP write support
URIimap: overload "" to ->as_string
MANIFEST | 2 ++
lib/PublicInbox/LeiToMail.pm | 14 +++++------
lib/PublicInbox/NetReader.pm | 47 +++++++++++++++++++++--------------
lib/PublicInbox/NetWriter.pm | 26 +++++++++++++++++++
lib/PublicInbox/URIimap.pm | 1 +
t/lei-convert.t | 2 +-
t/lei-externals.t | 8 +++---
t/lei-import-imap.t | 2 +-
t/net_reader-imap.t | 2 +-
t/uri_imap.t | 1 +
xt/lei-auth-fail.t | 1 +
xt/net_writer-imap.t | 48 ++++++++++++++++++++++++++++++++++++
12 files changed, 121 insertions(+), 33 deletions(-)
create mode 100644 lib/PublicInbox/NetWriter.pm
create mode 100644 xt/net_writer-imap.t
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-02-19 12:09 6% [PATCH 0/6] lei: start working on IMAP writes Eric Wong
2021-02-19 12:09 7% ` [PATCH 3/6] tests: require Mail::IMAPClient for IMAP tests 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).