]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/v2reindex.t
t/*.t: reduce dependency on Email::MIME APIs
[public-inbox.git] / t / v2reindex.t
index 7bf6bc2f935f7f3ce9923d4a7b249b62dc5cb640..b97c6498c27b085c029b792392e10c5181b422a3 100644 (file)
@@ -8,7 +8,7 @@ use PublicInbox::ContentId qw(content_digest);
 use File::Path qw(remove_tree);
 use PublicInbox::TestCommon;
 require_git(2.6);
-require_mods(qw(DBD::SQLite Search::Xapian Email::MIME));
+require_mods(qw(DBD::SQLite Search::Xapian));
 use_ok 'PublicInbox::V2Writable';
 my ($inboxdir, $for_destroy) = tmpdir();
 my $ibx_config = {
@@ -24,15 +24,13 @@ my $agpl = do {
        <$fh>;
 };
 my $phrase = q("defending all users' freedom");
-my $mime = Email::MIME->create(
-       header => [
-               From => 'a@example.com',
-               To => 'test@example.com',
-               Subject => 'this is a subject',
-               Date => 'Fri, 02 Oct 1993 00:00:00 +0000',
-       ],
-       body => $agpl,
-);
+my $mime = PublicInbox::MIME->new(<<'EOF'.$agpl);
+From: a@example.com
+To: test@example.com
+Subject: this is a subject
+Date: Fri, 02 Oct 1993 00:00:00 +0000
+
+EOF
 my $minmax;
 my $msgmap;
 my ($mark1, $mark2, $mark3, $mark4);