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 1/8] xt/net_writer_imap: test "lei convert" w/ IMAP source
  2021-10-28 11:14  6% [PATCH 0/8] lei: docs and cleanups Eric Wong
@ 2021-10-28 11:14  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-10-28 11:14 UTC (permalink / raw)
  To: meta

I just did a double-take and nearly thought authentication
was broken while reading LeiConvert.pm.  Add a comment in
LeiConvert.pm to clarify things, too.
---
 lib/PublicInbox/LeiConvert.pm | 1 +
 xt/net_writer-imap.t          | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/lib/PublicInbox/LeiConvert.pm b/lib/PublicInbox/LeiConvert.pm
index 68fc7c0ba2b0..424eab8e22e2 100644
--- a/lib/PublicInbox/LeiConvert.pm
+++ b/lib/PublicInbox/LeiConvert.pm
@@ -55,6 +55,7 @@ sub lei_convert { # the main "lei convert" method
 	my $devfd = $lei->path_to_fd($ovv->{dst}) // return;
 	$lei->{opt}->{augment} = 1 if $devfd < 0;
 	$self->prepare_inputs($lei, \@inputs) or return;
+	# n.b. {net} {auth} is handled by l2m worker
 	my ($op_c, $ops) = $lei->workers_start($self, 1);
 	$lei->{wq1} = $self;
 	$self->wq_io_do('process_inputs', []);
diff --git a/xt/net_writer-imap.t b/xt/net_writer-imap.t
index afa4bcc3e881..333e0e3b7ee0 100644
--- a/xt/net_writer-imap.t
+++ b/xt/net_writer-imap.t
@@ -137,6 +137,13 @@ test_lei(sub {
 	is_deeply($res->[0]->[1], $plack_qp_eml,
 			'lei q wrote expected result');
 
+	my $mdir = "$ENV{HOME}/t.mdir";
+	lei_ok 'convert', $folder_url, '-o', $mdir;
+	my @mdfiles = glob("$mdir/*/*");
+	is(scalar(@mdfiles), 1, '1 message from IMAP => Maildir conversion');
+	is_deeply(eml_load($mdfiles[0]), $plack_qp_eml,
+		'conversion from IMAP to Maildir');
+
 	lei_ok qw(q f:matz -a -o), $folder_url;
 	$nwr->imap_each($folder_uri, $imap_slurp_all, my $aug = []);
 	is(scalar(@$aug), 2, '2 results after augment') or diag explain($aug);

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/8] lei: docs and cleanups
@ 2021-10-28 11:14  6% Eric Wong
  2021-10-28 11:14  7% ` [PATCH 1/8] xt/net_writer_imap: test "lei convert" w/ IMAP source Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-10-28 11:14 UTC (permalink / raw)
  To: meta

Expect more on the way.  As always some bugs and fixes were
found while attempting to write docs :x

Eric Wong (8):
  xt/net_writer_imap: test "lei convert" w/ IMAP source
  lei convert: use "--output" in failure message
  doc: lei-convert: various updates and cleanups
  doc: lei blob: wording fixups, describe --remote
  lei convert: remove redundant input_net_cb
  doc: lei-add-watch: add warning about unreliability
  lei sucks: show nproc in CPU info
  lei rm: move generic input_maildir_cb to LeiInput parent class

 Documentation/lei-add-watch.pod |  8 ++++++--
 Documentation/lei-blob.pod      | 12 ++++++++----
 Documentation/lei-convert.pod   | 21 +++++++++------------
 lib/PublicInbox/LeiConvert.pm   |  8 ++------
 lib/PublicInbox/LeiInput.pm     |  5 +++++
 lib/PublicInbox/LeiRm.pm        |  5 -----
 lib/PublicInbox/LeiSucks.pm     |  4 +++-
 t/lei-convert.t                 | 10 ++++++++++
 xt/net_writer-imap.t            |  7 +++++++
 9 files changed, 50 insertions(+), 30 deletions(-)


^ 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-10-28 11:14  6% [PATCH 0/8] lei: docs and cleanups Eric Wong
2021-10-28 11:14  7% ` [PATCH 1/8] xt/net_writer_imap: test "lei convert" w/ IMAP source 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).