-ok(run_script(['-init', 'test', $inboxdir, "$pfx/", $addr]),
- 'initialized repo');
-xsys_e(qw(git config -f), $pi_config,
- qw(publicinbox.test.newsgroup inbox.test));
-open my $fh, '>', "$inboxdir/description" or die "open: $!\n";
-print $fh "test for public-inbox\n";
-close $fh or die "close: $!\n";
-my $app = require $psgi;
-my $git = PublicInbox::Git->new($inboxdir);
-my $im = PublicInbox::Import->new($git, 'test', $addr);
-# ensure successful message delivery
-{
- my $mime = PublicInbox::Eml->new(<<EOF);
+my $eml = eml_load('t/iso-2202-jp.eml');
+# ensure successful message deliveries
+my $ibx = create_inbox('u8-2', sub {
+ my ($im, $ibx) = @_;
+ my $addr = $ibx->{-primary_address};
+ $im->add($eml) or xbail '->add';
+ $eml->header_set('Content-Type',
+ "text/plain; charset=\rso\rb\0gus\rithurts");
+ $eml->header_set('Message-ID', '<broken@example.com>');
+ $im->add($eml) or xbail '->add';
+ $im->add(PublicInbox::Eml->new(<<EOF)) or xbail '->add';