From 9d1d7c2b505454fba331666a951e0f7997500b3c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 25 Feb 2021 10:11:03 +0000 Subject: lei convert: support IMAP output and "-F eml" inputs eml ("message/rfc822" MIME type) is supported by "lei import", so it probably makes sense to support via convert, at least for tests. And IMAP support is supported in "lei q -o $MFOLDER", so this only required renaming {nrd} => {net} and initializing outputs before augment preparation (creating the IMAP folder) --- xt/net_writer-imap.t | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xt') diff --git a/xt/net_writer-imap.t b/xt/net_writer-imap.t index 64f822cf..da435926 100644 --- a/xt/net_writer-imap.t +++ b/xt/net_writer-imap.t @@ -138,6 +138,10 @@ test_lei(sub { $nwr->imap_each($folder_uri, $imap_slurp_all, my $empty = []); is(scalar(@$empty), 0, 'no results w/o augment'); + lei_ok qw(convert -F eml t/msg_iter-order.eml -o), $$folder_uri; + $nwr->imap_each($folder_uri, $imap_slurp_all, $empty = []); + is_deeply($empty, [ [ [], eml_load('t/msg_iter-order.eml') ] ], + 'converted to IMAP destination'); }); undef $cleanup; # remove temporary folder -- cgit v1.2.3-24-ge0c7