]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
tests: clarify Email::MIME is only for development
authorEric Wong <e@80x24.org>
Tue, 16 Jan 2024 11:52:51 +0000 (11:52 +0000)
committerEric Wong <e@80x24.org>
Wed, 17 Jan 2024 09:37:53 +0000 (09:37 +0000)
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
t/eml.t
t/import.t
t/mime.t

index 25caaaa906881a1befaa93b983b597a667f3ebdb..5f159683a1d11279807261af3f3ab4c1dccbcb2a 100644 (file)
@@ -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 2e6a441f51dc71b85bbb37fcff318f6f2bb88e47..690ada57937b24de6f919abf6cd76a41fc2dca03 100644 (file)
--- a/t/eml.t
+++ b/t/eml.t
@@ -1,8 +1,8 @@
 #!perl -w
-# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
+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)) {
index f1d61dae9b4f1c95208a69430098af5f0b6e0578..7e2432e7ee8250a8b103ab452fc87761f83411e3 100644 (file)
@@ -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';
 };
 
index 471f0efa99533fa3a58697e482f5eb0fdc739bc3..bf54118a365a4f7196f470bbe3f917d8a94538ee 100644 (file)
--- a/t/mime.t
+++ b/t/mime.t
@@ -1,10 +1,10 @@
 #!perl -w
-# Copyright (C) 2017-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # This library is free software; you can redistribute it and/or modify
 # it under the same terms as Perl itself.
 # Artistic or GPL-1+ <https://www.gnu.org/licenses/gpl-1.0.txt>
+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);