Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 8b91ca3cf214dfee27bcedd2ddb74b89 > files > 6

perl-Test-CPAN-Meta-JSON-0.10-2.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::JSON::Meta 0.08";
plan skip_all => "Test::JSON::Meta 0.08 required for testing META.json files" if $@;

plan no_plan;

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

use Test::JSON::Meta;                           # enter your module name here
my $version = $Test::JSON::Meta::VERSION;       # enter your module name here

is($meta->{version},$version,
    'META.json distribution version matches');

if($meta->{provides}) {
    for my $mod (keys %{$meta->{provides}}) {
        is($meta->{provides}{$mod}{version},$version,
            "META.json entry [$mod] version matches");
    }
}