]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/edit: use eml_load here, too
authorEric Wong <e@yhbt.net>
Wed, 20 May 2020 04:46:07 +0000 (04:46 +0000)
committerEric Wong <e@yhbt.net>
Wed, 20 May 2020 23:58:14 +0000 (23:58 +0000)
I missed this instance of file slurping into an Email::MIME-like
object the other week when tearing Email::MIME usage out.

t/edit.t

index 1a5698f69231232f5783cbc606f814ed00ff355f..4b004c1c2b622f58b5f7b8a2ff3579a59c40a3db 100644 (file)
--- a/t/edit.t
+++ b/t/edit.t
@@ -24,11 +24,9 @@ my $ibx = PublicInbox::Inbox->new({
 $ibx = PublicInbox::InboxWritable->new($ibx, {nproc=>1});
 my $cfgfile = "$tmpdir/config";
 local $ENV{PI_CONFIG} = $cfgfile;
-my $file = 't/data/0001.patch';
-open my $fh, '<', $file or die "open: $!";
-my $raw = do { local $/; <$fh> };
 my $im = $ibx->importer(0);
-my $mime = PublicInbox::Eml->new($raw);
+my $file = 't/data/0001.patch';
+my $mime = eml_load($file);
 my $mid = mid_clean($mime->header('Message-Id'));
 ok($im->add($mime), 'add message to be edited');
 $im->done;