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-ASN: 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 815CA1F55B for ; Sun, 10 May 2020 09:41:52 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] t/mime: fix test to work w/o Email::MIME Date: Sun, 10 May 2020 09:41:52 +0000 Message-Id: <20200510094152.30128-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Although the lazy loading changes were correct, the code was still using PublicInbox::MIME as a fixed class. Use the `$cls' variable from the loop. Favor ->subparts to ->parts, instead, too, since ->parts is discouraged by the Email::MIME manpage and not implemented for Eml. --- t/mime.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/mime.t b/t/mime.t index d17ec58e92d..46c1d8d7f5a 100644 --- a/t/mime.t +++ b/t/mime.t @@ -16,7 +16,7 @@ use_ok $_ for @classes; local $SIG{__WARN__} = sub {}; # needed for old Email::Simple (used by E::M) for my $cls (@classes) { - my $msg = PublicInbox::MIME->new(<<'EOF'); + my $msg = $cls->new(<<'EOF'); From: Richard Hansen To: git@vger.kernel.org Cc: Richard Hansen @@ -49,7 +49,7 @@ dkTlB69771K2eXK4LcHSH/2LqX+VYa3K44vrx1ruzjXdNWzIpKBy0weFNiwnJCGofvCysM2RCSI1 EOF - my @parts = $msg->parts; + my @parts = $msg->subparts; my $exp = <