]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
t/thread-cycle: note Mail::Thread is dev-only
authorEric Wong <e@80x24.org>
Mon, 27 Oct 2025 17:39:41 +0000 (17:39 +0000)
committerEric Wong <e@80x24.org>
Tue, 28 Oct 2025 19:26:00 +0000 (19:26 +0000)
We haven't used Mail::Thread in WWW since 2016, so don't confuse
users about it being missing when they see test suite results.

lib/PublicInbox/TestCommon.pm
t/thread-cycle.t

index 46bfca58564addf6d723fdf96ba0ce495de30ecf..16b0083bda1c11fd0dd8d2377cc9d29124c14210 100644 (file)
@@ -296,7 +296,7 @@ sub require_mods (@) {
                return;
        }
        my $m = join(', ', @need)." missing for $0";
-       $m =~ s/\bEmail::MIME\b/Email::MIME (development purposes only)/;
+       $m =~ s/\b(Email::MIME|Mail::Thread)\b/$1 (dev purposes only)/;
        skip($m, $maybe) if $maybe;
        plan(skip_all => $m)
 }
index 1e5dfb51ab47a2865f9ab7835eda154291a5e65e..e04062e53ba1fc244fc69ae3ea551fba811449f0 100644 (file)
@@ -61,7 +61,7 @@ my ($simples, $smsgs) = $make_objs->(
 my $st = thread_to_s($smsgs);
 
 SKIP: {
-       skip 'Mail::Thread missing', 1 unless $mt;
+       require_mods 'Mail::Thread', 1;
        check_mt($st, $simples, 'Mail::Thread output matches');
 }
 
@@ -81,14 +81,14 @@ my @backwards = (
 ($simples, $smsgs) = $make_objs->(@backwards);
 my $backward = thread_to_s($smsgs);
 SKIP: {
-       skip 'Mail::Thread missing', 1 unless $mt;
+       require_mods 'Mail::Thread', 1;
        check_mt($backward, $simples, 'matches Mail::Thread backwards');
 }
 ($simples, $smsgs) = $make_objs->(reverse @backwards);
 my $forward = thread_to_s($smsgs);
 unless ('Mail::Thread sorts by Date') {
        SKIP: {
-               skip 'Mail::Thread missing', 1 unless $mt;
+               require_mods 'Mail::Thread', 1;
                check_mt($forward, $simples, 'matches Mail::Thread forwards');
        }
 }