Adding an automated test for POD correctness.
authorAndrew Moore <andrew.moore@liblime.com>
Fri, 20 Jun 2008 18:02:03 +0000 (13:02 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Fri, 20 Jun 2008 18:04:56 +0000 (13:04 -0500)
This test script checks all perl files in the C4 directory for POD correctness. It is
completely optional, and as of yet, is not actually run when you run the test suite.
It's just a handy way to check our POD documentation, which should be correct before
we release code.

This script can be invoked with 'prove -v xt/author/podcorrectness.t'

Additionally, this is the first test in the 'xt' directory. Current perl testing practices
have reserved the 'xt' directory for tests that should be run by the code authors before
release. See:
http://perl-qa.hexten.net/wiki/index.php/Oslo_QA_Hackathon_2008_:Achievements#Testing_Best_Practices
for more information.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>

xt/author/podcorrectness.t [new file with mode: 0644]

diff --git a/xt/author/podcorrectness.t b/xt/author/podcorrectness.t
new file mode 100644 (file)
index 0000000..6ad915c
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+
+=head2 podcorrectness.t
+
+This test file checks all perl modules in the C4 directory for POD
+correctness. It typically finds things like pod tags withouth blank
+lines immediately before or after them, unknown directives, or =over,
+=item, and =back in the wrong order.
+
+You must have Test::Pod installed.
+
+One good way to run this is with C<prove -v
+xt/author/podcorrectness.t>
+
+=cut
+
+use Test::More;
+eval "use Test::Pod 1.00";
+plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
+my @poddirs = qw( C4 );
+all_pod_files_ok( all_pod_files( @poddirs ) );
+