You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Geoffrey Young <ge...@modperlcookbook.org> on 2002/09/17 18:10:14 UTC
Re: cvs commit: modperl-2.0/t/response/TestDirective pod.pm
dougm@apache.org wrote:
> dougm 2002/09/16 19:37:44
>
> Added: t/response/TestDirective pod.pm
> Log:
> Submitted by: Philippe M. Chiasson <go...@cpan.org>
> Reviewed by: dougm
> test for pod directives
speaking of which, below is a test for testing all the pod in the
distribution. it borrows some code from Test::Pod, but since
Test::Pod uses Test::Builder I couldn't get both Apache::Test and
Test::More to plan() and play nice together.
I'm not good enough with pod links to fix the link error in Table.pod
the test exposes :)
--Geoff
use strict;
use warnings FATAL => 'all';
use Apache::Test;
use Apache::TestUtil;
use File::Spec;
use File::Find qw(find);
my @files;
find(
sub { push @files, $File::Find::name if m!\.p(m|od|l)$! },
File::Spec->catfile(qw(.. blib lib))
);
plan tests => scalar @files, have_module('Pod::Checker');
foreach my $file (@files) {
my $checker = Pod::Checker->new;
$checker->parse_from_file($file, \*STDOUT);
my $errors = $checker->num_errors;
$errors = 0 if $errors == -1;
ok t_cmp(0, $errors, $file);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org