[Moose-commits] r7650 - Moose/trunk/xt
autarch at code2.0beta.co.uk
autarch at code2.0beta.co.uk
Fri Feb 13 14:56:42 GMT 2009
Author: autarch
Date: 2009-02-13 06:56:42 -0800 (Fri, 13 Feb 2009)
New Revision: 7650
Added:
Moose/trunk/xt/version_numbers.t
Log:
Add a test that version numbers are consistent across all .pm files - inspired by MX::GlobRef test
Added: Moose/trunk/xt/version_numbers.t
===================================================================
--- Moose/trunk/xt/version_numbers.t (rev 0)
+++ Moose/trunk/xt/version_numbers.t 2009-02-13 14:56:42 UTC (rev 7650)
@@ -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 $moose_ver = $versions{'Moose.pm'};
+
+for my $module ( grep { $_ ne 'Moose.pm' } sort keys %versions ) {
+ is( $versions{$module}, $moose_ver,
+ "version for $module is the same as in Moose.pm" );
+}
Property changes on: Moose/trunk/xt/version_numbers.t
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Rev
Name: svn:eol-style
+ native
More information about the Moose-commits
mailing list