[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.2.10-48-gad32ef5



The following commit has been merged in the master branch:
commit 969941b9e38ad1dfa9a5ef6db9f67e85642172f3
Author: Russ Allbery <rra@debian.org>
Date:   Sun May 10 00:20:17 2009 -0700

    Add two more modules to the coverage test with private symbols
    
    Redo the structure of the test so that private symbol regexes can be added
    and add two more modules (Lintian::Relation and Lintian::Relation::Version)
    that have complete POD coverage but just don't uglify internal methods with
    underscores.

diff --git a/t/scripts/pod-coverage.t b/t/scripts/pod-coverage.t
index 0d7f648..9f937e9 100755
--- a/t/scripts/pod-coverage.t
+++ b/t/scripts/pod-coverage.t
@@ -8,13 +8,20 @@ eval 'use Test::Pod::Coverage';
 plan skip_all => 'Test::Pod::Coverage is required for testing POD coverage'
     if $@;
 
-my @modules = qw(
-		Lintian::Check
-		Lintian::Collect
-		Lintian::Command
-		Lintian::Data
-		Lintian::Tag::Info
-	);
+# Association of modules to check with additional regexes of private symbols.
+# If one is inclined, one can consider the presence of regexes as a TODO to
+# add underscores; personally, I (rra) think they make the code hard to read.
+our %MODULES =
+    (
+     'Lintian::Check'             => [],
+     'Lintian::Collect'           => [],
+     'Lintian::Command'           => [],
+     'Lintian::Data'              => [],
+     'Lintian::Relation'          => [ qr/^parse_element$/,
+                                       qr/^implies_(element|array)/ ],
+     'Lintian::Relation::Version' => [ qr/^compare$/ ],
+     'Lintian::Tag::Info'         => [],
+    );
 # TODO:
 #		Lintian::Collect::Binary
 #		Lintian::Collect::Source
@@ -22,12 +29,12 @@ my @modules = qw(
 #		Lintian::Output::ColonSeparated
 #		Lintian::Output::LetterQualifier
 #		Lintian::Output::XML
-#		Lintian::Relation
 #		Lintian::Schedule
 
-plan tests => scalar(@modules);
+plan tests => scalar keys(%MODULES);
 
 # Ensure the following modules are documented:
-for my $module (@modules) {
-    pod_coverage_ok($module, "$module is covered");
+for my $module (sort keys %MODULES) {
+    pod_coverage_ok($module, { also_private => $MODULES{$module} },
+                    "$module is covered");
 }

-- 
Debian package checker


Reply to: