This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #123963] "@<fullwidth digit>"
[perl5.git] / cpan / Test-Simple / t / Legacy / dependents.t
CommitLineData
2c4d5b9b
SH
1#!/usr/bin/perl
2
3# Test important dependant modules so we don't accidentally half of CPAN.
4
5use strict;
6use warnings;
7
8use Test::More;
9
10BEGIN {
11 plan skip_all => "Dependents only tested when releasing" unless $ENV{PERL_RELEASING};
12}
13
809046db 14require File::Spec;
2c4d5b9b
SH
15use CPAN;
16
17CPAN::HandleConfig->load;
18$CPAN::Config->{test_report} = 0;
19
20# Module which depend on Test::More to test
21my @Modules = qw(
22 Test::Most
23 Test::Warn
24 Test::Exception
25 Test::Class
26 Test::Deep
27 Test::Differences
809046db 28 Test::NoWarnings
2c4d5b9b
SH
29);
30
31# Modules which are known to be broken
32my %Broken = map { $_ => 1 } qw(
2c4d5b9b
SH
33);
34
35TODO: for my $name (@ARGV ? @ARGV : @Modules) {
36 local $TODO = "$name known to be broken" if $Broken{$name};
37
6dab8563 38 local $ENV{PERL5LIB} = "$ENV{PERL5LIB}:" . File::Spec->rel2abs("blib/lib");
2c4d5b9b
SH
39 my $module = CPAN::Shell->expand("Module", $name);
40 $module->test;
41 ok( !$module->distribution->{make_test}->failed, $name );
42}
43
44done_testing();