diff options
author | Eric Wong <e@80x24.org> | 2021-09-07 22:41:41 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-08 02:40:54 +0000 |
commit | 5436acf49ef02a2be3ba732d1e77a7e2b22faf8c (patch) | |
tree | 83f497cc914c192c63f0c5da06dce55a58835b69 | |
parent | 083568c68cf37e945c95cd238a9beae1faad9bea (diff) | |
download | public-inbox-5436acf49ef02a2be3ba732d1e77a7e2b22faf8c.tar.gz |
It's a bit confusing to see "0 written to ..." when we actually wrote something.
-rw-r--r-- | lib/PublicInbox/LeiToMail.pm | 1 | ||||
-rw-r--r-- | t/lei-q-save.t | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm index 01f08384..dbf58df9 100644 --- a/lib/PublicInbox/LeiToMail.pm +++ b/lib/PublicInbox/LeiToMail.pm @@ -361,6 +361,7 @@ sub _v2_write_cb ($$) { $eml //= PublicInbox::Eml->new($bref); return if $dedupe && $dedupe->is_dup($eml, $smsg); $lei->{v2w}->ipc_do('add', $eml); # V2Writable->add + ++$lei->{-nr_write}; } } diff --git a/t/lei-q-save.t b/t/lei-q-save.t index 7aa9b84e..743a7b70 100644 --- a/t/lei-q-save.t +++ b/t/lei-q-save.t @@ -179,6 +179,8 @@ test_lei(sub { my (@before, @after); require PublicInbox::MboxReader; lei_ok(qw(q z:0.. -o), "v2:$v2"); + like($lei_err, qr/^# ([1-9][0-9]*) written to \Q$v2\E/sm, + 'non-zero write output to stderr'); lei_ok(qw(q z:0.. -o), "mboxrd:$home/before", '--only', $v2, '-j1,1'); open my $fh, '<', "$home/before"; PublicInbox::MboxReader->mboxrd($fh, sub { push @before, $_[0] }); |