From: Dave Rolsky Date: Sun, 3 May 2009 19:16:48 +0000 (-0500) Subject: add version number test for real X-Git-Tag: 0.84~19 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10a5dddd7fbaa278abe6fd88305c5c055516787b;p=gitmo%2FClass-MOP.git add version number test for real --- diff --git a/xt/author/version_numbers.t b/xt/author/version_numbers.t new file mode 100644 index 0000000..43ac9d4 --- /dev/null +++ b/xt/author/version_numbers.t @@ -0,0 +1,24 @@ +use strict; +use warnings; + +use File::Find::Rule; +use Module::Info; + +use Test::More qw( no_plan ); + + +my %versions; +for my $pm_file ( File::Find::Rule->file->name( qr/\.pm$/ )->in('lib' ) ) { + my $mod = Module::Info->new_from_file($pm_file); + + ( my $stripped_file = $pm_file ) =~ s{^lib/}{}; + + $versions{$stripped_file} = $mod->version; +} + +my $cmop_ver = $versions{'Class/MOP.pm'}; + +for my $module ( grep { $_ ne 'Class/MOP.pm' } sort keys %versions ) { + is( $versions{$module}, $cmop_ver, + "version for $module is the same as in Cmop.pm" ); +}