Skip to content

Commit

Permalink
extended test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
barbie committed Aug 23, 2014
1 parent e8edb7c commit 7942733
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changes log for Data-Phrasebook-Loader-YAML
- fixed license fields in META.json to be lists.
- added repository link to META.yml.
- added cpanminus to INSTALL.
- extended test suite.

0.12 2012-10-07
- fixed prerequisites in META files (thanks to D Thomas RT#79204).
Expand Down
8 changes: 8 additions & 0 deletions t/94metatest.t
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,13 @@ if($meta->{provides}) {
for my $mod (keys %{$meta->{provides}}) {
is($meta->{provides}{$mod}{version},$version,
"META.yml entry [$mod] version matches");

eval "require $mod";
my $VERSION = '$' . $mod . '::VERSION';
my $v = eval "$VERSION";
is($meta->{provides}{$mod}{version},$v,
"META.json entry [$mod] version matches module version");

isnt($meta->{provides}{$mod}{version},0);
}
}
10 changes: 9 additions & 1 deletion t/96metatest.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ is($meta->{version},$version,
if($meta->{provides}) {
for my $mod (keys %{$meta->{provides}}) {
is($meta->{provides}{$mod}{version},$version,
"META.json entry [$mod] version matches");
"META.json entry [$mod] version matches distribution version");

eval "require $mod";
my $VERSION = '$' . $mod . '::VERSION';
my $v = eval "$VERSION";
is($meta->{provides}{$mod}{version},$v,
"META.json entry [$mod] version matches module version");

isnt($meta->{provides}{$mod}{version},0);
}
}

0 comments on commit 7942733

Please sign in to comment.