From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 751B81F513 for ; Tue, 16 Jan 2024 11:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1705405975; bh=x2JJLK7kD8Z5NovdwDoIsxuk9CFSV2mo1UTBuVjRahE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uX1ey2Su+DXnecpJaTQj4iQa3KqB0UgjHpfgSmantE/SWyClhy2hGNwtQF9Qmudvj Wzhetdo4lGiCYedyv9zeLEanbp7r42gl0gfLaPIeiyjTRJrGVk+dAL+VoeRa43o89y KbpgH2Ll000/mFVjoVt+O8hl6V/CGkrBtUcg4+dg= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/5] tests: clarify Email::MIME is only for development Date: Tue, 16 Jan 2024 11:52:51 +0000 Message-ID: <20240116115255.3554317-2-e@80x24.org> In-Reply-To: <20240116115255.3554317-1-e@80x24.org> References: <20240116115255.3554317-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We moved to PublicInbox::Eml a while back and have no plans to go back to using Email::MIME, so don't tempt users and packagers to waste disk space on Email::MIME. --- lib/PublicInbox/TestCommon.pm | 1 + t/eml.t | 6 +++--- t/import.t | 3 ++- t/mime.t | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index 25caaaa9..5f159683 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -266,6 +266,7 @@ sub require_mods { } return unless @need; my $m = join(', ', @need)." missing for $0"; + $m =~ s/\bEmail::MIME\b/Email::MIME (development purposes only)/; skip($m, $maybe) if $maybe; plan(skip_all => $m) } diff --git a/t/eml.t b/t/eml.t index 2e6a441f..690ada57 100644 --- a/t/eml.t +++ b/t/eml.t @@ -1,8 +1,8 @@ #!perl -w -# Copyright (C) 2020-2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ +use v5.10.1; # TODO: check unicode_strings w/ 5.12 use strict; -use Test::More; use PublicInbox::TestCommon; use PublicInbox::MsgIter qw(msg_part_text); my @classes = qw(PublicInbox::Eml); @@ -355,7 +355,7 @@ if ('maxparts is a feature unique to us') { } SKIP: { - require_mods('PublicInbox::MIME', 1); + require_mods('Email::MIME', 1); my $eml = eml_load 't/utf8.eml'; my $mime = mime_load 't/utf8.eml'; for my $h (qw(Subject From To)) { diff --git a/t/import.t b/t/import.t index f1d61dae..7e2432e7 100644 --- a/t/import.t +++ b/t/import.t @@ -98,7 +98,8 @@ ok($@, 'Import->add fails on non-existent dir'); my @cls = qw(PublicInbox::Eml); SKIP: { - require_mods('PublicInbox::MIME', 1); + require_mods('Email::MIME', 1); + require PublicInbox::MIME; push @cls, 'PublicInbox::MIME'; }; diff --git a/t/mime.t b/t/mime.t index 471f0efa..bf54118a 100644 --- a/t/mime.t +++ b/t/mime.t @@ -1,10 +1,10 @@ #!perl -w -# Copyright (C) 2017-2021 all contributors +# Copyright (C) all contributors # This library is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # Artistic or GPL-1+ +use v5.10.1; # TODO: check unicode_strings w/ v5.12 use strict; -use Test::More; use PublicInbox::TestCommon; use PublicInbox::MsgIter; my @classes = qw(PublicInbox::Eml);