r10365 - in /branches/upstream/libtest-pod-perl: ./ current/ current/t/ current/t/pod/

vdanjean at users.alioth.debian.org vdanjean at users.alioth.debian.org
Sat Dec 1 12:19:49 UTC 2007


Author: vdanjean
Date: Sat Dec  1 12:19:49 2007
New Revision: 10365

URL: http://svn.debian.org/wsvn/?sc=1&rev=10365
Log:
[svn-inject] Installing original source of libtest-pod-perl

Added:
    branches/upstream/libtest-pod-perl/
    branches/upstream/libtest-pod-perl/current/
    branches/upstream/libtest-pod-perl/current/Changes
    branches/upstream/libtest-pod-perl/current/MANIFEST
    branches/upstream/libtest-pod-perl/current/META.yml
    branches/upstream/libtest-pod-perl/current/Makefile.PL
    branches/upstream/libtest-pod-perl/current/Pod.pm
    branches/upstream/libtest-pod-perl/current/t/
    branches/upstream/libtest-pod-perl/current/t/all_pod_files.t
    branches/upstream/libtest-pod-perl/current/t/cut-outside-block.pod
    branches/upstream/libtest-pod-perl/current/t/cut-outside-block.t
    branches/upstream/libtest-pod-perl/current/t/empty-file.pod
    branches/upstream/libtest-pod-perl/current/t/good.t
    branches/upstream/libtest-pod-perl/current/t/item-ordering.pod
    branches/upstream/libtest-pod-perl/current/t/item-ordering.t
    branches/upstream/libtest-pod-perl/current/t/load.t
    branches/upstream/libtest-pod-perl/current/t/missing-file.t
    branches/upstream/libtest-pod-perl/current/t/pod/
    branches/upstream/libtest-pod-perl/current/t/pod.t
    branches/upstream/libtest-pod-perl/current/t/pod/good-pod-script
    branches/upstream/libtest-pod-perl/current/t/pod/good.pod
    branches/upstream/libtest-pod-perl/current/t/pod/no_pod.pod
    branches/upstream/libtest-pod-perl/current/t/selftest.t
    branches/upstream/libtest-pod-perl/current/t/spaced-directives.pod
    branches/upstream/libtest-pod-perl/current/t/spaced-directives.t
    branches/upstream/libtest-pod-perl/current/t/unknown-directive.pod
    branches/upstream/libtest-pod-perl/current/t/unknown-directive.t

Added: branches/upstream/libtest-pod-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/Changes?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/Changes (added)
+++ branches/upstream/libtest-pod-perl/current/Changes Sat Dec  1 12:19:49 2007
@@ -1,0 +1,124 @@
+Change log for Test::Pod
+
+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

Added: branches/upstream/libtest-pod-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/MANIFEST?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/MANIFEST (added)
+++ branches/upstream/libtest-pod-perl/current/MANIFEST Sat Dec  1 12:19:49 2007
@@ -1,0 +1,25 @@
+Changes
+MANIFEST
+Makefile.PL
+Pod.pm
+
+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
+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
+META.yml                                 Module meta-data (added by MakeMaker)

Added: branches/upstream/libtest-pod-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/META.yml?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/META.yml (added)
+++ branches/upstream/libtest-pod-perl/current/META.yml Sat Dec  1 12:19:49 2007
@@ -1,0 +1,16 @@
+--- #YAML:1.0
+name:                Test-Pod
+version:             1.24
+abstract:            ~
+license:             unknown
+generated_by:        ExtUtils::MakeMaker version 6.30_01
+author:              ~
+distribution_type:   module
+requires:     
+    File::Spec:                    0
+    Pod::Simple:                   2.04
+    Test::Builder::Tester:         1.02
+    Test::More:                    0.62
+meta-spec:
+    url: <http://module-build.sourceforge.net/META-spec-new.html>;
+    version: 1.1

Added: branches/upstream/libtest-pod-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/Makefile.PL?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/Makefile.PL (added)
+++ branches/upstream/libtest-pod-perl/current/Makefile.PL Sat Dec  1 12:19:49 2007
@@ -1,0 +1,15 @@
+# $Id: Makefile.PL 125 2005-10-24 04:55:20Z andy $
+use ExtUtils::MakeMaker;
+
+WriteMakefile (
+    'NAME'           => 'Test::Pod',
+    'VERSION_FROM'   => 'Pod.pm',
+    'PREREQ_PM'      => {
+        'Pod::Simple'           => '2.04',
+        'Test::More'            => '0.62',
+        'Test::Builder::Tester' => '1.02',
+        'File::Spec'            => 0,
+    },
+    clean => { FILES => 'Test-Pod-*' },
+);
+

Added: branches/upstream/libtest-pod-perl/current/Pod.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/Pod.pm?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/Pod.pm (added)
+++ branches/upstream/libtest-pod-perl/current/Pod.pm Sat Dec  1 12:19:49 2007
@@ -1,0 +1,271 @@
+package Test::Pod;
+
+use strict;
+
+=head1 NAME
+
+Test::Pod - check for POD errors in files
+
+=head1 VERSION
+
+Version 1.24
+
+=cut
+
+use vars qw( $VERSION );
+$VERSION = '1.24';
+
+=head1 SYNOPSIS
+
+C<Test::Pod> lets you check the validity of a POD file, and report
+its results in standard C<Test::Simple> fashion.
+
+    use Test::Pod;
+    plan tests => $num_tests;
+    pod_file_ok( $file, "Valid POD file" );
+
+Module authors can include the following in a F<t/pod.t> file and
+have C<Test::Pod> 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<all_pod_files()> 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<Apache::Test>):
+
+    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<Pod::Simple> to do the heavy lifting.
+
+=cut
+
+use 5.004;
+
+use Pod::Simple;
+use Test::Builder;
+use File::Spec;
+
+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(@_);
+}
+
+=head1 FUNCTIONS
+
+=head2 pod_file_ok( FILENAME[, TESTNAME ] )
+
+C<pod_file_ok()> 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<pod_file_ok()> will show any pod checking errors as
+diagnostics.
+
+The optional second argument TESTNAME is the name of the test.  If it
+is omitted, C<pod_file_ok()> 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;
+    $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( [@files/@directories] )
+
+Checks all the files in C<@files> for valid POD.  It runs
+L<all_pod_files()> on each file/directory, and calls the C<plan()> function for you
+(one test for each function), so you can't have already called C<plan>.
+
+If C<@files> is empty or not passed, the function finds all POD files in
+the F<blib> directory if it exists, or the F<lib> 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<t/pod.t>:
+
+    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 @files = @_ ? @_ : all_pod_files();
+
+    $Test->plan( tests => scalar @files );
+
+    my $ok = 1;
+    foreach my $file ( @files ) {
+        pod_file_ok( $file, $file ) or undef $ok;
+    }
+    return $ok;
+}
+
+=head2 all_pod_files( [@dirs] )
+
+Returns a list of all the Perl files in I<$dir> and in directories below.
+If no directories are passed, it defaults to F<blib> if F<blib> exists,
+or else F<lib> if not.  Skips any files in CVS or .svn directories.
+
+A Perl file is:
+
+=over 4
+
+=item * Any file that ends in 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.
+
+=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 @queue = @_ ? @_ : _starting_points();
+    my @pod = ();
+
+    while ( @queue ) {
+        my $file = shift @queue;
+        if ( -d $file ) {
+            local *DH;
+            opendir DH, $file or next;
+            my @newfiles = readdir DH;
+            closedir DH;
+
+            @newfiles = File::Spec->no_upwards( @newfiles );
+            @newfiles = grep { $_ ne "CVS" && $_ ne ".svn" } @newfiles;
+
+            foreach my $newfile (@newfiles) {
+                my $filename = File::Spec->catfile( $file, $newfile );
+                if ( -f $filename ) {
+                    push @queue, $filename;
+                }
+                else {
+                    push @queue, File::Spec->catdir( $file, $newfile );
+                }
+            }
+        }
+        if ( -f $file ) {
+            push @pod, $file if _is_perl( $file );
+        }
+    } # while
+    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$/;
+
+    local *FH;
+    open FH, $file or return;
+    my $first = <FH>;
+    close FH;
+
+    return 1 if defined $first && ($first =~ /^#!.*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 Andy Lester, C<< <andy at petdance.com> >>.
+
+Originally by brian d foy.
+
+=head1 ACKNOWLEDGEMENTS
+
+Thanks to
+David Wheeler
+and
+Peter Edwards
+for contributions and to C<brian d foy> for the original code.
+
+=head1 COPYRIGHT
+
+Copyright 2006, Andy Lester, All Rights Reserved.
+
+You may use, modify, and distribute this package under the
+same terms as Perl itself.
+
+=cut
+
+1;

Added: branches/upstream/libtest-pod-perl/current/t/all_pod_files.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/all_pod_files.t?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/all_pod_files.t (added)
+++ branches/upstream/libtest-pod-perl/current/t/all_pod_files.t Sat Dec  1 12:19:49 2007
@@ -1,0 +1,32 @@
+#!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' ),
+        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
+        t/pod/no_pod.pod
+    );
+}
+my @files = sort map { lc } all_pod_files( "blib", "t/pod" );
+ at expected = sort map { lc } @expected;
+is_deeply( \@files, \@expected, "Got all the distro files" );

Added: branches/upstream/libtest-pod-perl/current/t/cut-outside-block.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/cut-outside-block.pod?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/cut-outside-block.pod (added)
+++ branches/upstream/libtest-pod-perl/current/t/cut-outside-block.pod Sat Dec  1 12:19:49 2007
@@ -1,0 +1,13 @@
+# $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;

Added: branches/upstream/libtest-pod-perl/current/t/cut-outside-block.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/cut-outside-block.t?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/cut-outside-block.t (added)
+++ branches/upstream/libtest-pod-perl/current/t/cut-outside-block.t Sat Dec  1 12:19:49 2007
@@ -1,0 +1,21 @@
+#!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" );
+}

Added: branches/upstream/libtest-pod-perl/current/t/empty-file.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/empty-file.pod?rev=10365&op=file
==============================================================================
    (empty)

Added: branches/upstream/libtest-pod-perl/current/t/good.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/good.t?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/good.t (added)
+++ branches/upstream/libtest-pod-perl/current/t/good.t Sat Dec  1 12:19:49 2007
@@ -1,0 +1,24 @@
+#!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' );
+}

Added: branches/upstream/libtest-pod-perl/current/t/item-ordering.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/item-ordering.pod?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/item-ordering.pod (added)
+++ branches/upstream/libtest-pod-perl/current/t/item-ordering.pod Sat Dec  1 12:19:49 2007
@@ -1,0 +1,45 @@
+# $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
+

Added: branches/upstream/libtest-pod-perl/current/t/item-ordering.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/item-ordering.t?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/item-ordering.t (added)
+++ branches/upstream/libtest-pod-perl/current/t/item-ordering.t Sat Dec  1 12:19:49 2007
@@ -1,0 +1,19 @@
+#!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(
+    "$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" );

Added: branches/upstream/libtest-pod-perl/current/t/load.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/load.t?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/load.t (added)
+++ branches/upstream/libtest-pod-perl/current/t/load.t Sat Dec  1 12:19:49 2007
@@ -1,0 +1,7 @@
+#!perl -T
+
+use Test::More tests=>1;
+
+BEGIN {
+    use_ok( 'Test::Pod' );
+}

Added: branches/upstream/libtest-pod-perl/current/t/missing-file.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/missing-file.t?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/missing-file.t (added)
+++ branches/upstream/libtest-pod-perl/current/t/missing-file.t Sat Dec  1 12:19:49 2007
@@ -1,0 +1,29 @@
+#!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" );
+}

Added: branches/upstream/libtest-pod-perl/current/t/pod.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/pod.t?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/pod.t (added)
+++ branches/upstream/libtest-pod-perl/current/t/pod.t Sat Dec  1 12:19:49 2007
@@ -1,0 +1,5 @@
+#!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();

Added: branches/upstream/libtest-pod-perl/current/t/pod/good-pod-script
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/pod/good-pod-script?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/pod/good-pod-script (added)
+++ branches/upstream/libtest-pod-perl/current/t/pod/good-pod-script Sat Dec  1 12:19:49 2007
@@ -1,0 +1,19 @@
+#!/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 at aol.com
+
+=head1 COPYRIGHT
+
+Copyright 2004, Andy Lester
+
+=cut

Added: branches/upstream/libtest-pod-perl/current/t/pod/good.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/pod/good.pod?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/pod/good.pod (added)
+++ branches/upstream/libtest-pod-perl/current/t/pod/good.pod Sat Dec  1 12:19:49 2007
@@ -1,0 +1,17 @@
+=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 at aol.com
+
+=head1 COPYRIGHT
+
+Copyright 2004, Andy Lester
+
+=cut

Added: branches/upstream/libtest-pod-perl/current/t/pod/no_pod.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/pod/no_pod.pod?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/pod/no_pod.pod (added)
+++ branches/upstream/libtest-pod-perl/current/t/pod/no_pod.pod Sat Dec  1 12:19:49 2007
@@ -1,0 +1,7 @@
+Test::Pod test pod -- a valid pod file
+
+This is a pod file without pod commands
+ 
+Andy Lester, garbage-address at aol.com
+
+Copyright 2004, Andy Lester

Added: branches/upstream/libtest-pod-perl/current/t/selftest.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/selftest.t?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/selftest.t (added)
+++ branches/upstream/libtest-pod-perl/current/t/selftest.t Sat Dec  1 12:19:49 2007
@@ -1,0 +1,12 @@
+#!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");
+

Added: branches/upstream/libtest-pod-perl/current/t/spaced-directives.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/spaced-directives.pod?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/spaced-directives.pod (added)
+++ branches/upstream/libtest-pod-perl/current/t/spaced-directives.pod Sat Dec  1 12:19:49 2007
@@ -1,0 +1,20 @@
+=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 at aol.com
+
+=head1 COPYRIGHT
+      
+Copyright 2004, Andy Lester
+
+=cut

Added: branches/upstream/libtest-pod-perl/current/t/spaced-directives.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/spaced-directives.t?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/spaced-directives.t (added)
+++ branches/upstream/libtest-pod-perl/current/t/spaced-directives.t Sat Dec  1 12:19:49 2007
@@ -1,0 +1,22 @@
+#!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-rectives.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" );
+}

Added: branches/upstream/libtest-pod-perl/current/t/unknown-directive.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/unknown-directive.pod?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/unknown-directive.pod (added)
+++ branches/upstream/libtest-pod-perl/current/t/unknown-directive.pod Sat Dec  1 12:19:49 2007
@@ -1,0 +1,25 @@
+# $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, E<lt>bdfoy at cpan.orgE<gt>
+
+=head1 COPYRIGHT
+
+Copyright 2002, brian d foy
+
+=cut

Added: branches/upstream/libtest-pod-perl/current/t/unknown-directive.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtest-pod-perl/current/t/unknown-directive.t?rev=10365&op=file
==============================================================================
--- branches/upstream/libtest-pod-perl/current/t/unknown-directive.t (added)
+++ branches/upstream/libtest-pod-perl/current/t/unknown-directive.t Sat Dec  1 12:19:49 2007
@@ -1,0 +1,21 @@
+#!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" );
+}




More information about the Pkg-perl-cvs-commits mailing list