about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-02-22 06:18:55 +0000
committerEric Wong <e@80x24.org>2021-02-22 10:31:02 +0000
commitdf7e9afebf0c583640773efac01583aa9a1fa2d6 (patch)
tree94da2c04a7951a3132321122168079012ccf02b4 /t
parent2ee341027929f716636aa7f03057a961d3a02d1c (diff)
downloadpublic-inbox-df7e9afebf0c583640773efac01583aa9a1fa2d6.tar.gz
Since eidx_init updates ALL.git/objects/info/alternates, we need
to ensure new epochs we create from LeiStore->importer exist
before eidx_init writes alternates.

Reported-by: Kyle Meyer <kyle@kyleam.com>
Link: https://public-inbox.org/meta/8735xou0gq.fsf@kyleam.com/
Diffstat (limited to 't')
-rw-r--r--t/lei-import.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/lei-import.t b/t/lei-import.t
index 46747a91..fa4fc504 100644
--- a/t/lei-import.t
+++ b/t/lei-import.t
@@ -13,6 +13,19 @@ lei_ok([qw(import -f eml -)], undef, { %$lei_opt, 0 => $fh },
         \'import single file from stdin') or diag $lei_err;
 close $fh;
 lei_ok(qw(q s:boolean), \'search hit after import');
+lei_ok(qw(q s:boolean -f mboxrd), \'blob accessible after import');
+{
+        my $expect = [ eml_load('t/data/0001.patch') ];
+        require PublicInbox::MboxReader;
+        my @cmp;
+        open my $fh, '<', \$lei_out or BAIL_OUT "open :scalar: $!";
+        PublicInbox::MboxReader->mboxrd($fh, sub {
+                my ($eml) = @_;
+                $eml->header_set('Status');
+                push @cmp, $eml;
+        });
+        is_deeply(\@cmp, $expect, 'got expected message in mboxrd');
+}
 lei_ok(qw(import -f eml), 't/data/message_embed.eml',
         \'import single file by path');