use warnings;
use Test::More;
use PublicInbox::TestCommon;
+use PublicInbox::Eml;
require_mods(qw(DBD::SQLite Search::Xapian));
use_ok 'PublicInbox::Msgmap';
use_ok 'PublicInbox::SearchIdx';
my $git = PublicInbox::Git->new($git_dir);
my $im = PublicInbox::Import->new($git, 'testbox', 'test@example');
$im->init_bare;
- $im->add(Email::MIME->create(
- header => [
- From => 'a@example.com',
- To => 'b@example.com',
- 'Content-Type' => 'text/plain',
- Subject => 'boo!',
- 'Message-ID' => '<a@example.com>',
- ],
- body => "hello world gmane:666\n",
- ));
+ $im->add(PublicInbox::Eml->new(<<'EOF'));
+From: a@example.com
+To: b@example.com
+Subject: boo!
+Message-ID: <a@example.com>
+
+hello world gmane:666
+EOF
$im->done;
}
{