diff options
author | Eric Wong <e@yhbt.net> | 2020-05-20 04:46:07 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-05-20 23:58:14 +0000 |
commit | 6eb84d273eea3943ceb7e138cdfd17c83ade410f (patch) | |
tree | 04850770f547639e5d406289754e363545a68f0e | |
parent | 7eda704e4ec5b2ab897ef8da4fc90c48fcfc45a9 (diff) | |
download | public-inbox-6eb84d273eea3943ceb7e138cdfd17c83ade410f.tar.gz |
I missed this instance of file slurping into an Email::MIME-like object the other week when tearing Email::MIME usage out.
-rw-r--r-- | t/edit.t | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; |