From c569e8bc323be65feae51d0f54f2e332b2bdc48a Mon Sep 17 00:00:00 2001 From: Leon Brocard Date: Tue, 23 Jun 2009 19:32:10 +0100 Subject: [PATCH] add pod tests --- CHANGES | 1 + MANIFEST | 2 ++ t/pod.t | 6 ++++++ t/pod_coverage.t | 13 +++++++++++++ 4 files changed, 22 insertions(+) create mode 100644 t/pod.t create mode 100644 t/pod_coverage.t diff --git a/CHANGES b/CHANGES index 8040e9d..6edc35f 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,7 @@ Revision history for Perl module WWW::Gazetteer: - add human-readable license - move test into t/ directory - use strict + - add pod tests 0.23 Sat Jan 29 11:14:51 CET 2005 - reworked to use Module::Pluggable diff --git a/MANIFEST b/MANIFEST index 9ea38fd..d241fd8 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3,5 +3,7 @@ Gazetteer.pm MANIFEST This list of files Makefile.PL README +t/pod.t +t/pod_coverage.t t/simple.t META.yml Module meta-data (added by MakeMaker) diff --git a/t/pod.t b/t/pod.t new file mode 100644 index 0000000..5c3c791 --- /dev/null +++ b/t/pod.t @@ -0,0 +1,6 @@ +#!perl -T + +use Test::More; +eval "use Test::Pod 1.14"; +plan skip_all => "Test::Pod 1.14 required for testing POD: $@" if $@; +all_pod_files_ok(); diff --git a/t/pod_coverage.t b/t/pod_coverage.t new file mode 100644 index 0000000..99e049e --- /dev/null +++ b/t/pod_coverage.t @@ -0,0 +1,13 @@ +use Test::More; +eval "use Test::Pod::Coverage 1.00"; +plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" + if $@; +all_pod_coverage_ok( { also_private => [qr/^[A-Z_]+$/] } ); + +# Workaround for dumb bug (fixed in 5.8.7) where Test::Builder thinks that +# certain "die"s that happen inside evals are not actually inside evals, +# because caller() is broken if you turn on $^P like Module::Refresh does +# +# (I mean, if we've gotten to this line, then clearly the test didn't die, no?) +Test::Builder->new->{Test_Died} = 0; +