This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Test-Simple-0.94
[perl5.git] / cpan / Test-Simple / t / 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
14use CPAN;
15
16CPAN::HandleConfig->load;
17$CPAN::Config->{test_report} = 0;
18
19# Module which depend on Test::More to test
20my @Modules = qw(
21 Test::Most
22 Test::Warn
23 Test::Exception
24 Test::Class
25 Test::Deep
26 Test::Differences
27);
28
29# Modules which are known to be broken
30my %Broken = map { $_ => 1 } qw(
31 Test::Class
32);
33
34TODO: for my $name (@ARGV ? @ARGV : @Modules) {
35 local $TODO = "$name known to be broken" if $Broken{$name};
36
37 my $module = CPAN::Shell->expand("Module", $name);
38 $module->test;
39 ok( !$module->distribution->{make_test}->failed, $name );
40}
41
42done_testing();