Author: hmbrand
Date: Mon Jun  7 00:28:06 2010
New Revision: 14117

Added:
   dbi/trunk/t/pod-cm.t
Modified:
   dbi/trunk/MANIFEST.SKIP

Log:
Base test for spelling tests in pod (only if available)

Modified: dbi/trunk/MANIFEST.SKIP
==============================================================================
--- dbi/trunk/MANIFEST.SKIP     (original)
+++ dbi/trunk/MANIFEST.SKIP     Mon Jun  7 00:28:06 2010
@@ -23,6 +23,7 @@
 ^[oj]dbc/
 ^mail/
 ^t/zz_\w+_pp.t$
+^t/pod-cm.t
 ^.git
 ^git-
 ^devel/

Added: dbi/trunk/t/pod-cm.t
==============================================================================
--- (empty file)
+++ dbi/trunk/t/pod-cm.t        Mon Jun  7 00:28:06 2010
@@ -0,0 +1,31 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+eval "use Pod::Spell::CommonMistakes qw( check_pod )";
+plan skip_all => "Pod::Spell::CommonMistakes required for testing POD 
spelling" if $@;
+
+use File::Find;
+
+my @files;
+find (sub {
+    $File::Find::dir =~ m/\bblib/ and return;
+    m/\.pm$/ and push @files, $File::Find::name;
+    }, ".");
+s{^\./}{} for @files;
+
+foreach my $pm (sort @files) {
+    my $result = check_pod ($pm);
+    my @keys = keys %$result;
+
+    is (scalar @keys, 0, "$pm");
+    @keys or next;
+
+    diag (join "\n", map { "$_\t=> $result->{$_}" } @keys);
+    }
+
+done_testing;
+
+1;

Reply via email to