openafs/doc/man-pages/check-pod
Russ Allbery a792acdadc Add include method for POD documentation
Add a preprocessor for POD documentation that handles a custom
=include directive.  Demonstrate how to use the preprocessor by
factoring out all the standard PTS options into a separate POD
fragment and including that fragment in all the PTS commands that
take the standard options instead of including that documentation
in each separate file.

Change-Id: If5255efc6d3fc670b38a9898b3d7d3c60af04fcf
Reviewed-on: http://gerrit.openafs.org/2440
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-15 21:09:13 -07:00

36 lines
772 B
Perl
Executable File

#!/usr/bin/perl
#
# Written by Jason Edgecombe based on the Test::Pod documentation. The
# best way to run it is to run:
#
# prove check-pod
#
# from the doc/man-pages directory, which will show any errors found in
# any of the POD files.
#
# Extended by Davor Ocelic to support explicit list of POD files or
# sections to check:
#
# check-pod pod1/fs.pod
# check-pod pod5
# check-pod pod1 pod8/volserver.pod
#
use strict;
use Test::More;
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
my @poddirs = qw( pod1 pod5 pod8 );
my @list;
for ( @ARGV ? @ARGV : @poddirs ) {
if ( -f ) {
push @list, $_
} elsif ( -d ) {
push @list, grep { !m,fragments/, } all_pod_files( $_ )
}
}
all_pod_files_ok( @list );