Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > cad0a4964ba0b24702fdef3e32738e40 > files > 7

perl-Test-CPAN-Meta-0.17-3.fc15.noarch.rpm

use Test::More;

# Skip if doing a regular install
plan skip_all => "Author tests not required for installation"
    unless ( $ENV{AUTOMATED_TESTING} );

eval "use Test::CPAN::Meta 0.12";
plan skip_all => "Test::CPAN::Meta 0.12 required for testing META.yml" if $@;

plan no_plan;

my $yaml = meta_spec_ok(undef,undef,@_);

use MyDistro;

is($yaml->{version},$MyDistro::VERSION,
    'META.yml distribution version matches');

if($yaml->{provides}) {
    for my $mod (keys %{$yaml->{provides}}) {
        is($yaml->{provides}{$mod}{version},$MyDistro::VERSION,
            "META.yml entry [$mod] version matches");
    }
}