Test-Pod-1.48000755000767000024 012141632736 12467 5ustar00davidstaff000000000000Test-Pod-1.48/Build.PL000444000767000024 153712141632736 14126 0ustar00davidstaff000000000000use strict; use warnings; use Module::Build '0.30'; Module::Build->new( module_name => 'Test::Pod', license => 'perl', configure_requires => { 'Module::Build' => '0.30', }, create_makefile_pl => 'traditional', build_requires => { 'File::Spec' => 0, 'Pod::Simple' => '3.05', 'Test::More' => '0.62', }, requires => { 'File::Find' => 0, 'Pod::Simple' => '3.05', 'Test::Builder::Tester' => '1.02', 'Test::More' => '0.62', }, meta_merge => { resources => { homepage => 'http://search.cpan.org/dist/Test-Pod/', bugtracker => 'http://github.com/theory/test-pod/issues/', repository => 'http://github.com/theory/test-pod/tree/', } }, )->create_build_script; Test-Pod-1.48/Changes000444000767000024 1603512141632736 14144 0ustar00davidstaff000000000000Change log for Test::Pod 1.48 - 2013-05-06T04:47:00Z * Fixed test failure with versions of Pod::Simple lower than 3.24. Thanks to Martin Holste and Tatsuhiko Miyagawa for the reports. 1.47 - 2013-05-05T03:14:25Z * Fixed failing test on Pod::Simple 3.27 and higher. 1.46 - 2013-02-16T19:46:17Z * Fixed a crash when `all_pod_files_ok()` finds no files to test. Thanks to H.Merijn Brand. * Switched from custom file searching code to File::Find. Suggested by H.Merijn Brand. * Fixed failing test on Pod::Simple 3.24. 1.45 - 2011-03-09T20:00:59 * Removed Module::Build from `build_requires`, since it does nothing out-of-the ordinary, and this keeps it out of the `Makefile.PL`'s `PM_PREREQ`. Per gripe from Peter Scott. 1.44 - 2010-04-26T17:33:02 * Restored the `Makefile.PL` by using Module::Build::Compat's "traditional" configuration. 1.43 - 2010-04-21T02:33:59 * Reduced prereq for Test::More to 0.62, prereq for Pod::Simple to 3.05, and added File::Spec to the list of prereqs. The prerequisites were needlessly high, and by reducing them Test::Pod can rely on the core versions of those modules in on Perl 5.8.8. Thanks to Chris Wittmer for the patch. 1.42 - 2010-03-10T19:41:20 * Fixed invalid Pod link. Thanks to Markus Sonderegger. * Changed license in the POD to "Same as Perl" to match the license listed in `META.yml`. * Changed `Build.PL` to require Module::Build 0.30. It already does in `configure_requires`, but also doing so on the `use` line helps provide a more useful error message in older toolchain tools that don't use `configure_requires`. * Updated `MANIFEST` so that the `README` is actually included in the distribution. * Now recognizes `.bat` files as Perl files when they contain "--*-Perl-*--" on the first line. Thanks to Olivier 'dolmen' Mengué for the patch (RT #46973). * `all_pod_files_ok()` now operates on directories as well as files. Thanks to Adriano Ferreira for the patch (RT #33025). * Files with no POD now have " (no pod)" added to test name. Thanks to Adriano Ferreira for the patch (RT #34955). * Updated documentation to note that `.PL` files are considered Perl files. Thanks to Adriano Ferreira for the spot (RT #34955). * `all_pod_files_ok()` now lets `pod_file_ok()` set the default test name, rather than doing so itself. Thanks to Adriano Ferreira for the spot (RT #34955). 1.41 - 2010-01-14T20:09:25 * Maintenance transfered to David Wheeler. * Test::Pod no longer complains about the construct L, as it is no longer illegal (as of Perl 5.11.3). * Switched to Module::Build. 1.40 - Sun Jul 12 23:32:11 CDT 2009 [THINGS THAT MAY BREAK YOUR CODE] Test::Pod now requires Perl 5.8.0. [ENHANCEMENTS] Test::Pod now complains about the illegal construct L. Thanks to Paul Miller. The list of directories to exclude is now much longer, and is available in %Test::Pod::ignore_dirs. This list is right now: '.bzr' => 'Bazaar', '.git' => 'Git', '.hg' => 'Mercurial', '.pc' => 'quilt', '.svn' => 'Subversion', CVS => 'CVS', RCS => 'RCS', SCCS => 'SCCS', _darcs => 'darcs', _sgbak => 'Vault/Fortress', 1.26 - Wed Jul 19 09:54:48 CDT 2006 No new functionality in this version. [FIXES] * Fixed a Win32 build bug. * Fixed a bug in the SYNOPSIS. 1.24 - Wed Feb 1 15:18:06 PST 2006 [THINGS THAT MAY BREAK YOUR CODE] * The long-deprecated pod_ok() is now gone, along with all its constants. [ENHANCEMENTS] * Now runs properly under VMS. Thanks to Peter Edwards. 1.22 - Sun Oct 23 23:45:51 CDT 2005 [ENHANCEMENTS] * Added check for lines with only whitespace before or after a directive. Older POD formatters can get confused by such lines since they goof up paragraph mode. (RT #6467) [FIXES] * Bumped up requirements to Test::Simple 0.62. 1.20 - Wed Jun 23 00:28:35 CDT 2004 [ENHANCEMENTS] * Looks in blib/ if there is one, otherwise looks in lib/ * Thanks to David Wheeler for nudging. 1.18 - Fri May 28 23:48:28 CDT 2004 [FIXES] * Now exports all_pod_files() as advertised. * Also includes *.t files as Pod. 1.16 - Fri Apr 30 17:42:50 CDT 2004 [FIXES] * Fixed a warning under 5.8.3. Also explicitly closes dir handles when searching for POD. 1.14 - Wed Apr 28 23:38:29 CDT 2004 [ENHANCEMENTS] * Now runs taint-safe. No longer uses File::Find. I'm trying to get all my modules to run under -T correctly, so this is big. 1.12 - Sat Mar 13 10:34:06 CST 2004 [ENHANCEMENTS] * all_pod_files() now picks up *.PL files. 1.10 - Tue Mar 9 23:27:16 CST 2004 [ENHANCEMENTS] * Almost all of my coverage is almost to 100%. [FIXES] * Fixed some test bugs on Win32. * Message problems if the file is missing. 1.08 - Wed Jan 21 00:40:07 CST 2004 No new features or fixes. [FIXES] * t/all_pod_files.t failed because in my zeal to be a good cross-platform guy, I used File::Spec separators on lists to compare against those coming from File::Find, which uses slashes. 1.06 - Sat Jan 10 08:47:55 CST 2004 No new features or fixes. [FIXES] * t/all_pod_files.t failed because all_pod_files() returns an unsorted list. Fixed. 1.04 - Fri Jan 9 22:39:15 CST 2004 [ENHANCEMENTS] * all_pod_files() can now take multiple start directories. Thanks to David Wheeler for the patch. 1.03 [FIXES] * All the *ok() functions now return the value of the underlying ok(). [DOCUMENTATION] * All functions are now documented. [INTERNALS] * Removed valid_file, which was not being used. 1.02 - Mon Nov 10 09:07:39 CST 2003 No new functionality. If 1.00 installed for you, then you don't need 1.02. [FIXES] * Fixed dumb test failure in t/all_pod_files.t. [DOCUMENTATION] * Spiffed up the SYNOPSIS. 1.00 - Mon Nov 10 00:06:30 CST 2003 [NEW FEATURES] * Added all_pod_files_ok() method. 0.96 - Sat Oct 11 22:46:00 CST 2003 * Removed dependency on IO::Scalar, which was wrong. * Requires newest, most-lenient Pod::Simple. * Added various tests to the t/ hierarchy. Thanks to David Wheeler for help on this. 0.95 - Mon Mar 3 09:35:00 CST 2002 * Rewrote to use Pod::Simple instead of Pod::Checker * Deprecated the pod_ok function. * Added pod_file_ok() to replace pod_ok(). 0.90 - Tue Dec 3 18:59:39 CST 2002 * things seem to be going well, so this is not in beta :) * cleanup up some formatting * fixed the bad pod test which some Pod::Checker versions reported extra errors 0.72 - Thu Nov 14 20:16:13 CST 2002 * cleaned up Makefile.PL and tests * no code changes 0.71 - Mon Sep 9 10:58:22 CDT 2002 * added Test::Builder::Tester to PREREQ_PM 0.70 - Thu Sep 5 22:39:13 CDT 2002 * pod_ok shows POD errors and warnings if it fails * you can give the test a name Test-Pod-1.48/Makefile.PL000444000767000024 77412141632736 14566 0ustar00davidstaff000000000000# Note: this file was auto-generated by Module::Build::Compat version 0.4003 use ExtUtils::MakeMaker; WriteMakefile ( 'NAME' => 'Test::Pod', 'VERSION_FROM' => 'lib/Test/Pod.pm', 'PREREQ_PM' => { 'File::Find' => 0, 'File::Spec' => 0, 'Pod::Simple' => '3.05', 'Test::Builder::Tester' => '1.02', 'Test::More' => '0.62' }, 'INSTALLDIRS' => 'site', 'EXE_FILES' => [], 'PL_FILES' => {} ) ; Test-Pod-1.48/MANIFEST000444000767000024 71412141632736 13737 0ustar00davidstaff000000000000Build.PL Changes lib/Test/Pod.pm Makefile.PL MANIFEST This list of files META.json META.yml README t/00-load.t t/all_pod_files.t t/cut-outside-block.pod t/cut-outside-block.t t/empty-file.pod t/good.t t/item-ordering.pod t/item-ordering.t t/load.t t/missing-file.t t/pod.t t/pod/good-pod-script t/pod/good-pod-script.bat t/pod/good.pod t/pod/no_pod.pod t/selftest.t t/spaced-directives.pod t/spaced-directives.t t/unknown-directive.pod t/unknown-directive.t Test-Pod-1.48/META.json000444000767000024 266412141632736 14255 0ustar00davidstaff000000000000{ "abstract" : "check for POD errors in files", "author" : [ "Currently maintained by David E. Wheeler, C<< >>." ], "dynamic_config" : 1, "generated_by" : "Module::Build version 0.4003, CPAN::Meta::Converter version 2.120921", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Test-Pod", "prereqs" : { "build" : { "requires" : { "File::Spec" : "0", "Pod::Simple" : "3.05", "Test::More" : "0.62" } }, "configure" : { "requires" : { "Module::Build" : "0.30" } }, "runtime" : { "requires" : { "File::Find" : "0", "Pod::Simple" : "3.05", "Test::Builder::Tester" : "1.02", "Test::More" : "0.62" } } }, "provides" : { "Test::Pod" : { "file" : "lib/Test/Pod.pm", "version" : "1.48" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "http://github.com/theory/test-pod/issues/" }, "homepage" : "http://search.cpan.org/dist/Test-Pod/", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "url" : "http://github.com/theory/test-pod/tree/" } }, "version" : "1.48" } Test-Pod-1.48/META.yml000444000767000024 153012141632736 14074 0ustar00davidstaff000000000000--- abstract: 'check for POD errors in files' author: - 'Currently maintained by David E. Wheeler, C<< >>.' build_requires: File::Spec: 0 Pod::Simple: 3.05 Test::More: 0.62 configure_requires: Module::Build: 0.30 dynamic_config: 1 generated_by: 'Module::Build version 0.4003, CPAN::Meta::Converter version 2.120921' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Test-Pod provides: Test::Pod: file: lib/Test/Pod.pm version: 1.48 requires: File::Find: 0 Pod::Simple: 3.05 Test::Builder::Tester: 1.02 Test::More: 0.62 resources: bugtracker: http://github.com/theory/test-pod/issues/ homepage: http://search.cpan.org/dist/Test-Pod/ license: http://dev.perl.org/licenses/ repository: http://github.com/theory/test-pod/tree/ version: 1.48 Test-Pod-1.48/README000444000767000024 117712141632736 13512 0ustar00davidstaff000000000000Test/Pod version 1.48 ===================== This library's module, Test::Pod, provides an interface for validating POD in module files. INSTALLATION To install this module, type the following: perl Build.PL ./Build ./Build test ./Build install Dependencies ------------ Test::Pod requires the following modules: * Pod::Simple 3.05 * Test::More 0.62 * Test::Builder::Tester 1.02 * File::Spec Copyright and Licence --------------------- Copyright 2006-2010, Andy Lester. Some Rights Reserved. You may use, modify, and distribute this package under the terms as the Artistic License v2.0 or GNU Public License v2.0. Test-Pod-1.48/lib000755000767000024 012141632736 13235 5ustar00davidstaff000000000000Test-Pod-1.48/lib/Test000755000767000024 012141632736 14154 5ustar00davidstaff000000000000Test-Pod-1.48/lib/Test/Pod.pm000444000767000024 1512612141632736 15416 0ustar00davidstaff000000000000package Test::Pod; use strict; =head1 NAME Test::Pod - check for POD errors in files =head1 VERSION Version 1.48 =cut our $VERSION = '1.48'; =head1 SYNOPSIS C lets you check the validity of a POD file, and report its results in standard C fashion. use Test::Pod tests => $num_tests; pod_file_ok( $file, "Valid POD file" ); Module authors can include the following in a F file and have C automatically find and check all POD files in a module distribution: use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); You can also specify a list of files to check, using the C function supplied: 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( blib script ); all_pod_files_ok( all_pod_files( @poddirs ) ); Or even (if you're running under L): 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( blib script ); use File::Spec::Functions qw( catdir updir ); all_pod_files_ok( all_pod_files( map { catdir updir, $_ } @poddirs ) ); =head1 DESCRIPTION Check POD files for errors or warnings in a test file, using C to do the heavy lifting. =cut use 5.008; use Test::Builder; use Pod::Simple; our %ignore_dirs = ( '.bzr' => 'Bazaar', '.git' => 'Git', '.hg' => 'Mercurial', '.pc' => 'quilt', '.svn' => 'Subversion', CVS => 'CVS', RCS => 'RCS', SCCS => 'SCCS', _darcs => 'darcs', _sgbak => 'Vault/Fortress', ); my $Test = Test::Builder->new; sub import { my $self = shift; my $caller = caller; for my $func ( qw( pod_file_ok all_pod_files all_pod_files_ok ) ) { no strict 'refs'; *{$caller."::".$func} = \&$func; } $Test->exported_to($caller); $Test->plan(@_); } sub _additional_test_pod_specific_checks { my ($ok, $errata, $file) = @_; return $ok; } =head1 FUNCTIONS =head2 pod_file_ok( FILENAME[, TESTNAME ] ) C will okay the test if the POD parses correctly. Certain conditions are not reported yet, such as a file with no pod in it at all. When it fails, C will show any pod checking errors as diagnostics. The optional second argument TESTNAME is the name of the test. If it is omitted, C chooses a default test name "POD test for FILENAME". =cut sub pod_file_ok { my $file = shift; my $name = @_ ? shift : "POD test for $file"; if ( !-f $file ) { $Test->ok( 0, $name ); $Test->diag( "$file does not exist" ); return; } my $checker = Pod::Simple->new; $checker->output_string( \my $trash ); # Ignore any output $checker->parse_file( $file ); my $ok = !$checker->any_errata_seen; $ok = _additional_test_pod_specific_checks( $ok, ($checker->{errata}||={}), $file ); $name .= ' (no pod)' if !$checker->content_seen; $Test->ok( $ok, $name ); if ( !$ok ) { my $lines = $checker->{errata}; for my $line ( sort { $a<=>$b } keys %$lines ) { my $errors = $lines->{$line}; $Test->diag( "$file ($line): $_" ) for @$errors; } } return $ok; } # pod_file_ok =head2 all_pod_files_ok( [@entries] ) Checks all the files under C<@entries> for valid POD. It runs L on directories and assumes everything else to be a file to be tested. It calls the C function for you (one test for each file), so you can't have already called C. If C<@entries> is empty or not passed, the function finds all POD files in files in the F directory if it exists, or the F directory if not. A POD file is one that ends with F<.pod>, F<.pl> and F<.pm>, or any file where the first line looks like a shebang line. If you're testing a module, just make a F: use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); Returns true if all pod files are ok, or false if any fail. =cut sub all_pod_files_ok { my @args = @_ ? @_ : _starting_points(); my @files = map { -d $_ ? all_pod_files($_) : $_ } @args; unless (@files) { $Test->skip_all( "No files found in (@args)\n" ); return 1; } $Test->plan( tests => scalar @files ); my $ok = 1; foreach my $file ( @files ) { pod_file_ok( $file ) or undef $ok; } return $ok; } =head2 all_pod_files( [@dirs] ) Returns a list of all the Perl files in I<@dirs> and in directories below. If no directories are passed, it defaults to F if F exists, or else F if not. Skips any files in F, F<.svn>, F<.git> and similar directories. See C<%Test::Pod::ignore_dirs> for a list of them. A Perl file is: =over 4 =item * Any file that ends in F<.PL>, F<.pl>, F<.PL>, F<.pm>, F<.pod>, or F<.t>. =item * Any file that has a first line with a shebang and "perl" on it. =item * Any file that ends in F<.bat> and has a first line with "--*-Perl-*--" on it. =back The order of the files returned is machine-dependent. If you want them sorted, you'll have to sort them yourself. =cut sub all_pod_files { my @pod; require File::Find; File::Find::find({ wanted => sub { -f $_ && _is_perl ($_) and push @pod, $File::Find::name }, no_chdir => 1, }, @_ ? @_ : _starting_points()); return @pod; } sub _starting_points { return 'blib' if -e 'blib'; return 'lib'; } sub _is_perl { my $file = shift; return 1 if $file =~ /\.PL$/; return 1 if $file =~ /\.p(?:l|m|od)$/; return 1 if $file =~ /\.t$/; open my $fh, '<', $file or return; my $first = <$fh>; close $fh; return 1 if defined $first && ($first =~ /(?:^#!.*perl)|--\*-Perl-\*--/); return; } =head1 TODO STUFF TO DO Note the changes that are being made. Note that you no longer can test for "no pod". =head1 AUTHOR Currently maintained by David E. Wheeler, C<< >>. Originally by brian d foy. Maintainer emeritus: Andy Lester, C<< >>. =head1 ACKNOWLEDGEMENTS Thanks to Andy Lester, David Wheeler, Paul Miller and Peter Edwards for contributions and to C for the original code. =head1 COPYRIGHT AND LICENSE Copyright 2006-2010, Andy Lester. Some Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut 1; Test-Pod-1.48/t000755000767000024 012141632736 12732 5ustar00davidstaff000000000000Test-Pod-1.48/t/00-load.t000444000767000024 36612141632736 14375 0ustar00davidstaff000000000000#!perl -T use warnings; use strict; use Test::More tests => 2; BEGIN { use_ok( 'Test::Pod' ); use_ok( 'Pod::Simple' ); } diag( "Testing Test::Pod $Test::Pod::VERSION, Perl $], $^X" ); diag( "Using Pod::Simple $Pod::Simple::VERSION" ); Test-Pod-1.48/t/all_pod_files.t000444000767000024 165712141632736 16061 0ustar00davidstaff000000000000#!perl -Tw use strict; use Test::More tests => 2; BEGIN { use_ok( "Test::Pod" ); } my @expected; if ( $^O eq "VMS" ) { @expected = ( File::Spec->catfile( 'blib', 'lib', 'Test', 'Pod.pm' ), File::Spec->catfile( 't', 'pod', 'good-pod-script.' ), File::Spec->catfile( 't', 'pod', 'good-pod-script.bat' ), File::Spec->catfile( 't', 'pod', 'good.pod' ), File::Spec->catfile( 't', 'pod', 'no_pod.pod' ), ); } else { # The expected files have slashes, not File::Spec separators, because # that's how File::Find does it. @expected = qw( blib/lib/Test/Pod.pm t/pod/good-pod-script t/pod/good-pod-script.bat t/pod/good.pod t/pod/no_pod.pod ); } my @files = sort map { lc } all_pod_files( "blib", "t/pod" ); @expected = sort map { lc } @expected; s{\\}{/}g for @files, @expected; is_deeply( \@files, \@expected, "Got all the distro files" ); Test-Pod-1.48/t/cut-outside-block.pod000444000767000024 22712141632736 17111 0ustar00davidstaff000000000000# $Id: cut-outside-block.pod 48 2003-03-04 17:16:27Z petdance $ use strict; =cut =head1 COPYRIGHT Copyright 2002, Andy Lester =cut use warnings; Test-Pod-1.48/t/cut-outside-block.t000444000767000024 60412141632736 16571 0ustar00davidstaff000000000000#!perl -T use strict; use Test::Builder::Tester tests => 2; use Test::More; BEGIN { use_ok( 'Test::Pod' ); } BAD: { my $file = 't/cut-outside-block.pod'; test_out( "not ok 1 - POD test for $file" ); pod_file_ok( $file ); test_fail(-1); test_diag( "$file (5): =cut found outside a pod block. Skipping to next block." ); test_test( "$file is bad" ); } Test-Pod-1.48/t/empty-file.pod000444000767000024 012141632736 15554 0ustar00davidstaff000000000000Test-Pod-1.48/t/good.t000444000767000024 67712141632736 14176 0ustar00davidstaff000000000000#!perl -T use strict; use Test::Builder::Tester tests => 3; use Test::More; BEGIN { use_ok( 'Test::Pod' ); } my $filename = "t/pod/good.pod"; GOOD: { test_out( "ok 1 - Blargo!" ); pod_file_ok( $filename, "Blargo!" ); test_test( 'Handles good.pod OK' ); } DEFAULT_NAME: { test_out( "ok 1 - POD test for t/pod/good.pod" ); pod_file_ok( $filename ); test_test( 'Handles good.pod OK, and builds default name OK' ); } Test-Pod-1.48/t/item-ordering.pod000444000767000024 63412141632736 16323 0ustar00davidstaff000000000000# $Id: item-ordering.pod 53 2003-03-04 17:41:18Z petdance $ =head1 COPYRIGHT Copyright 2002, Andy Lester =cut # Here's a list with items out of order =over 4 =item 2 This is the first prime number =item 3 This is the second prime number =item 5 This is the third prime number =back =cut # Here's a list with items that can't be =over 4 Blah blah blah =item 1 Item One =item 2 Item 2 =cut Test-Pod-1.48/t/item-ordering.t000444000767000024 244512141632736 16026 0ustar00davidstaff000000000000#!perl -T use strict; use Test::Builder::Tester tests => 2; use Test::More; BEGIN { use_ok( 'Test::Pod' ); } my $file = 't/item-ordering.pod'; test_out( "not ok 1 - POD test for $file" ); pod_file_ok( $file ); test_fail(-1); test_diag( ( Pod::Simple->VERSION == 3.24 ? ( "$file (17): Expected text matching /\\s+[^\\*\\d]/ after '=item'", "$file (21): Expected text matching /\\s+[^\\*\\d]/ after '=item'", "$file (32): You can't have =items (as at line 36) unless the first thing after the =over is an =item", ) : Pod::Simple->VERSION >= 3.27 ? ( "$file (17): Expected text after =item, not a number", "$file (21): Expected text after =item, not a number", "$file (32): You can't have =items (as at line 36) unless the first thing after the =over is an =item", "$file (32): =over without closing =back", ) : Pod::Simple->VERSION >= 3.25 ? ( "$file (17): Expected text after =item, not a number", "$file (21): Expected text after =item, not a number", "$file (32): You can't have =items (as at line 36) unless the first thing after the =over is an =item", ) : ( "$file (32): You can't have =items (as at line 36) unless the first thing after the =over is an =item", )) ); test_test( "$file is bad" ); Test-Pod-1.48/t/load.t000444000767000024 11212141632736 14145 0ustar00davidstaff000000000000#!perl -T use Test::More tests=>1; BEGIN { use_ok( 'Test::Pod' ); } Test-Pod-1.48/t/missing-file.t000444000767000024 114212141632736 15640 0ustar00davidstaff000000000000#!perl -T use strict; use Test::Builder::Tester tests => 3; use Test::More; BEGIN { use_ok( 'Test::Pod' ); } MISSING_FILE: { my $file = 't/non-existent.pod'; test_out( "not ok 1 - I hope the file is there" ); test_fail(+1); pod_file_ok( $file, "I hope the file is there" ); test_diag( "$file does not exist" ); test_test( "$file is bad" ); } MISSING_FILE_NO_MESSAGE: { my $file = 't/non-existent.pod'; test_out( "not ok 1 - POD test for $file" ); test_fail(+1); pod_file_ok( $file ); test_diag( "$file does not exist" ); test_test( "$file is bad" ); } Test-Pod-1.48/t/pod.t000444000767000024 21412141632736 14013 0ustar00davidstaff000000000000#!perl -Tw use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); Test-Pod-1.48/t/selftest.t000444000767000024 22512141632736 15064 0ustar00davidstaff000000000000#!perl -T use Test::More tests=>2; BEGIN { use_ok( "Test::Pod" ); } my $self = $INC{'Test/Pod.pm'}; pod_file_ok($self, "My own pod is OK"); Test-Pod-1.48/t/spaced-directives.pod000444000767000024 55712141632736 17160 0ustar00davidstaff000000000000=head1 NAME Test::Pod test pod -- a valid pod file =head1 DESCRIPTION This is a pod file where there are invisible spaces on either side of directives. One row of spaces is just before the AUTHOR directive, and one is right after the COPYRIGHT. =head1 AUTHOR Andy Lester, garbage-address@aol.com =head1 COPYRIGHT Copyright 2004, Andy Lester =cut Test-Pod-1.48/t/spaced-directives.t000444000767000024 122412141632736 16651 0ustar00davidstaff000000000000#!perl -T use strict; use Test::More skip_all => "Not written yet"; use Test::Builder::Tester tests => 2; use Test::More; BEGIN { use_ok( 'Test::Pod' ); } BAD: { my $name = 'Test name: Something not likely to accidentally occur!'; my $file = 't/spaced-directives.pod'; test_out( "not ok 1 - $name" ); pod_file_ok( $file, $name ); test_fail(-1); test_diag('*** WARNING: line containing nothing but whitespace in paragraph at line 11 in file t/spaced-directives.pod'); test_diag('*** WARNING: line containing nothing but whitespace in paragraph at line 17 in file t/spaced-directives.pod'); test_test( "$name is bad" ); } Test-Pod-1.48/t/unknown-directive.pod000444000767000024 53512141632736 17231 0ustar00davidstaff000000000000# $Id: unknown-directive.pod 91 2004-01-26 03:50:06Z petdance $ =head1 NAME Test::Pod test pod -- a valid pod file =head1 DESCRIPTION =over4 This is a pod file with an incorrect =over. =under 4 This is a pod file with a bad directive. =head1 AUTHOR brian d foy, Ebdfoy@cpan.orgE =head1 COPYRIGHT Copyright 2002, brian d foy =cut Test-Pod-1.48/t/unknown-directive.t000444000767000024 73512141632736 16714 0ustar00davidstaff000000000000#!perl -T use strict; use Test::Builder::Tester tests => 2; use Test::More; BEGIN { use_ok( 'Test::Pod' ); } BAD: { my $name = 'Test name: Something not likely to accidentally occur!'; my $file = 't/unknown-directive.pod'; test_out( "not ok 1 - $name" ); pod_file_ok( $file, $name ); test_fail(-1); test_diag( "$file (9): Unknown directive: =over4",); test_diag( "$file (13): Unknown directive: =under",); test_test( "$name is bad" ); } Test-Pod-1.48/t/pod000755000767000024 012141632736 13514 5ustar00davidstaff000000000000Test-Pod-1.48/t/pod/good-pod-script000444000767000024 36012141632736 16565 0ustar00davidstaff000000000000#!/usr/bin/perl =head1 NAME This is a pretend script that we need to check =head1 DESCRIPTION This is a pod file without errors. =head1 AUTHOR Andy Lester, garbage-address@aol.com =head1 COPYRIGHT Copyright 2004, Andy Lester =cut Test-Pod-1.48/t/pod/good-pod-script.bat000444000767000024 120212141632736 17346 0ustar00davidstaff000000000000@rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT perl -x -S %0 %* if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl if %errorlevel% == 9009 echo You do not have Perl in your PATH. if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul goto endofperl @rem '; #!/usr/bin/perl #line 15 =head1 NAME This is a pretend script that we need to check =head1 DESCRIPTION This is a pod file without errors. =head1 AUTHOR Andy Lester, garbage-address@aol.com =head1 COPYRIGHT Copyright 2004, Andy Lester =cut __END__ :endofperl Test-Pod-1.48/t/pod/good.pod000444000767000024 32612141632736 15266 0ustar00davidstaff000000000000=head1 NAME Test::Pod test pod -- a valid pod file =head1 DESCRIPTION This is a pod file without errors. =head1 AUTHOR Andy Lester, garbage-address@aol.com =head1 COPYRIGHT Copyright 2004, Andy Lester =cut Test-Pod-1.48/t/pod/no_pod.pod000444000767000024 22412141632736 15611 0ustar00davidstaff000000000000Test::Pod test pod -- a valid pod file This is a pod file without pod commands Andy Lester, garbage-address@aol.com Copyright 2004, Andy Lester