summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/cpan/Test-Simple/t/dependents.t
blob: 64efca1cd4f193a2db3bd3376fbaee36bd41ec52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/perl

# Test important dependant modules so we don't accidentally half of CPAN.

use strict;
use warnings;

use Test::More;

BEGIN {
    plan skip_all => "Dependents only tested when releasing" unless $ENV{PERL_RELEASING};
}

use CPAN;

CPAN::HandleConfig->load;
$CPAN::Config->{test_report} = 0;

# Module which depend on Test::More to test
my @Modules = qw(
    Test::Most
    Test::Warn
    Test::Exception
    Test::Class
    Test::Deep
    Test::Differences
);

# Modules which are known to be broken
my %Broken = map { $_ => 1 } qw(
    Test::Class
);

TODO: for my $name (@ARGV ? @ARGV : @Modules) {
    local $TODO = "$name known to be broken" if $Broken{$name};

    my $module = CPAN::Shell->expand("Module", $name);
    $module->test;
    ok( !$module->distribution->{make_test}->failed, $name );
}

done_testing();