[Rt-commit] r5431 - in Test-Chimps: trunk trunk/t

zev at bestpractical.com zev at bestpractical.com
Fri Jun 23 17:33:42 EDT 2006


Author: zev
Date: Fri Jun 23 17:33:40 2006
New Revision: 5431

Modified:
   Test-Chimps/   (props changed)
   Test-Chimps/trunk/MANIFEST
   Test-Chimps/trunk/Makefile.PL
   Test-Chimps/trunk/t/00-dependencies.t

Log:
 r4208 at galvatron (orig r12):  zev | 2006-06-21 14:59:37 -0400
  r4204 at galvatron:  zev | 2006-06-21 13:30:45 -0400
  moved to Test::Dependencies
 


Modified: Test-Chimps/trunk/MANIFEST
==============================================================================
--- Test-Chimps/trunk/MANIFEST	(original)
+++ Test-Chimps/trunk/MANIFEST	Fri Jun 23 17:33:40 2006
@@ -1,18 +1,34 @@
+bin/poll_and_submit.pl
+bin/report_server.pl
+bin/submit_report.pl
 Changes
-MANIFEST
-META.yml # Will be created by "make dist"
-Makefile.PL
-README
-lib/Test/Chimps/Report.pm
+examples/list.tmpl
+inc/Module/AutoInstall.pm
+inc/Module/Install.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+lib/Test/Chimps.pm
 lib/Test/Chimps/Client.pm
+lib/Test/Chimps/Report.pm
 lib/Test/Chimps/Server.pm
+Makefile.PL
+MANIFEST
+META.yml			# Will be created by "make dist"
+README
 t
+t/00-dependencies.t
+t/01-report-basic.t
+t/05-client-basic.t
+t/10-server-base.t
 t/bogus-tests
 t/bogus-tests/00-basic.t
-t/05-client-basic.t
 t/boilerplate.t
-t/pod.t
-t/00-dependencies.t
-t/01-report-basic.t
 t/pod-coverage.t
-t/10-server-base.t
+t/pod.t

Modified: Test-Chimps/trunk/Makefile.PL
==============================================================================
--- Test-Chimps/trunk/Makefile.PL	(original)
+++ Test-Chimps/trunk/Makefile.PL	Fri Jun 23 17:33:40 2006
@@ -12,12 +12,10 @@
 requires('LWP::UserAgent');
 requires('Module::CoreList');
 requires('Params::Validate');
+requires('Test::Dependencies');
 requires('Test::TAP::HTMLMatrix');
 requires('Test::TAP::Model::Visual');
 requires('YAML::Syck');
 
-
-no_index        'directory'         => 'demos';
-
 auto_install;
 WriteAll;

Modified: Test-Chimps/trunk/t/00-dependencies.t
==============================================================================
--- Test-Chimps/trunk/t/00-dependencies.t	(original)
+++ Test-Chimps/trunk/t/00-dependencies.t	Fri Jun 23 17:33:40 2006
@@ -1,64 +1,6 @@
-#!/usr/bin/perl
+#!perl -T
 
-use warnings;
-use strict;
+use Test::Dependencies exclude => [qw/Test::Chimps/];
 
-=head1 DESCRIPTION
-
-Makes sure that all of the modules that are 'use'd are listed in the
-Makefile.PL as dependencies.
-
-=cut
-
-use Test::More qw(no_plan);
-use File::Find;
-use Module::CoreList;
-
-my %used;
-find( \&wanted, qw/ lib bin t /);
-
-sub wanted {
-    return unless -f $_;
-    return if $File::Find::dir =~ m!/.svn($|/)!;
-    return if $File::Find::name =~ /~$/;
-    return if $File::Find::name =~ /\.pod$/;
-    local $/;
-    open(FILE, $_) or return;
-    my $data = <FILE>;
-    close(FILE);
-    $used{$1}++ while $data =~ /^\s*use\s+([\w:]+)/gm;
-    while ($data =~ m|^\s*use base qw.([\w\s:]+)|gm) {
-        $used{$_}++ for split ' ', $1;
-    }
-}
-
-my %required;
-{ 
-    local $/;
-    ok(open(MAKEFILE,"Makefile.PL"), "Opened Makefile");
-    my $data = <MAKEFILE>;
-    close(FILE);
-    while ($data =~ /^\s*?requires\('([\w:]+)'(?:\s*=>\s*['"]?([\d\.]+)['"]?)?.*?(?:#(.*))?$/gm) {
-        $required{$1} = $2;
-        if (defined $3 and length $3) {
-            $required{$_} = undef for split ' ', $3;
-        }
-    }
-}
-
-for (sort keys %used) {
-    my $first_in = Module::CoreList->first_release($_);
-    next if defined $first_in and $first_in <= 5.00803;
-    next if /^(Test::Chimps)(::|$)/;
-    ok(exists $required{$_}, "$_ in Makefile.PL");
-    delete $used{$_};
-    delete $required{$_};
-}
-
-for (sort keys %required) {
-    my $first_in = Module::CoreList->first_release($_, $required{$_});
-    fail("Required module $_ is already in core") if defined $first_in and $first_in <= 5.00803;
-}
-
-1;
+ok_dependencies();
 


More information about the Rt-commit mailing list