From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3CCBC1F55B for ; Wed, 20 May 2020 04:46:07 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] t/edit: use eml_load here, too Date: Wed, 20 May 2020 04:46:07 +0000 Message-Id: <20200520044607.23399-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/t/edit.t b/t/edit.t index 1a5698f6..4b004c1c 100644 --- 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;