]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/v2reindex.t
t/*.t: use Email::MIME->create over PublicInbox::MIME->create
[public-inbox.git] / t / v2reindex.t
index 990513a3ac07d024d4d1742a864aaa81105ef2c9..7bf6bc2f935f7f3ce9923d4a7b249b62dc5cb640 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2018-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -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));
+require_mods(qw(DBD::SQLite Search::Xapian Email::MIME));
 use_ok 'PublicInbox::V2Writable';
 my ($inboxdir, $for_destroy) = tmpdir();
 my $ibx_config = {
@@ -18,14 +18,13 @@ my $ibx_config = {
        -primary_address => 'test@example.com',
        indexlevel => 'full',
 };
-my $agpl = eval {
+my $agpl = do {
        open my $fh, '<', 'COPYING' or die "can't open COPYING: $!";
        local $/;
        <$fh>;
 };
-$agpl or die "AGPL or die :P\n";
 my $phrase = q("defending all users' freedom");
-my $mime = PublicInbox::MIME->create(
+my $mime = Email::MIME->create(
        header => [
                From => 'a@example.com',
                To => 'test@example.com',