[EMAIL PROTECTED] wrote:
> dougm       2002/09/16 19:37:44
> 
>   Added:       t/response/TestDirective pod.pm
>   Log:
>   Submitted by:       Philippe M. Chiasson <[EMAIL PROTECTED]>
>   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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to