r28434 - /trunk/dh-make-perl/t/corelist.t

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Sat Dec 20 23:23:34 UTC 2008


Author: dmn
Date: Sat Dec 20 23:23:29 2008
New Revision: 28434

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=28434
Log:
t/corelist.t: rework by testing that all core modules are detected

"core" in this context is each module supplied by perl, perl-base and
perl-modules in /usr/{share,lib}/perl/<version>

Modified:
    trunk/dh-make-perl/t/corelist.t

Modified: trunk/dh-make-perl/t/corelist.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/corelist.t?rev=28434&op=diff
==============================================================================
--- trunk/dh-make-perl/t/corelist.t (original)
+++ trunk/dh-make-perl/t/corelist.t Sat Dec 20 23:23:29 2008
@@ -6,6 +6,8 @@
 use Test::More 'no_plan';
 
 use DhMakePerl;
+use Config;
+use File::Find::Rule;
 
 # Check to see if our module list contains some obvious candidates.
 my $maker = DhMakePerl->new();
@@ -13,3 +15,27 @@
 foreach my $module ( qw(Fatal File::Copy FindBin CGI IO::Handle Safe) ) {
     ok($maker->is_core_module($module), "$module should be a core module");
 }
+
+my @files = File::Find::Rule->file()
+                            ->name('*.pm')
+                            ->in(
+                                "/usr/share/perl/$Config{version}",
+                                "/usr/lib/perl/$Config{version}",
+                            );
+
+for (@files) {
+    s{/usr/(?:share|lib)/perl/$Config{version}/}{}o;
+
+    s{/}{::}g;
+    s/\.pm$//;
+
+    if ( $_ eq 'ExtUtils::Miniperl' ) {
+        # ExtUtils::Miniperl is not recognized by Module::CoreList
+        local $TODO = "$_ is not recognized by Module::Core:List";
+
+        ok( $maker->is_core_module($_), "$_ is core" );
+    }
+    else {
+        ok( $maker->is_core_module($_), "$_ is core" );
+    }
+}




More information about the Pkg-perl-cvs-commits mailing list