X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fv2reindex.t;h=b97c6498c27b085c029b792392e10c5181b422a3;hb=e6b7a7f5f70fb89a54ff158bc6c8b564149947e5;hp=990513a3ac07d024d4d1742a864aaa81105ef2c9;hpb=0f81681256c9f24c37759e26c6c21db187374438;p=public-inbox.git
diff --git a/t/v2reindex.t b/t/v2reindex.t
index 990513a3..b97c6498 100644
--- a/t/v2reindex.t
+++ b/t/v2reindex.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 all contributors
+# Copyright (C) 2018-2020 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
@@ -18,22 +18,19 @@ 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(
- 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);