[svn:dbi] r14117 - in dbi/trunk: . t

[email protected]
Newsgroups perl.dbi.changes
Message-ID <[email protected]>
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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.