X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fpod%2Fpoderrs.t;h=98c6320792a5a1cf92f38385bfcb5e7c3be71a14;hb=09576c7db8c59458f52d7746e7f4062d64ff34e7;hp=bec2a198b611b653053374578f9056c92e559c92;hpb=66aff6dd6356ffc29ccae7b7f1ff2e3f01929b1f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/pod/poderrs.t b/t/pod/poderrs.t index bec2a19..98c6320 100755 --- a/t/pod/poderrs.t +++ b/t/pod/poderrs.t @@ -1,7 +1,7 @@ -#!./perl BEGIN { - chdir 't' if -d 't'; - unshift @INC, './pod', '../lib'; + use File::Basename; + my $THISDIR = dirname $0; + unshift @INC, $THISDIR; require "testpchk.pl"; import TestPodChecker; } @@ -10,9 +10,14 @@ my %options = map { $_ => 1 } @ARGV; ## convert cmdline to options-hash my $passed = testpodchecker \%options, $0; exit( ($passed == 1) ? 0 : -1 ) unless $ENV{HARNESS_ACTIVE}; +### Deliberately throw in some blank but non-empty lines + +### The above line should contain spaces + __END__ +=head2 This should cause a warning =head1 NAME @@ -55,7 +60,7 @@ The above blank line contains tabs and spaces only =over 4 -=item oops +=item aaps =head2 end without begin @@ -71,6 +76,20 @@ The above blank line contains tabs and spaces only =end +second one results in end w/o begin + +=head2 begin w/o formatter + +=begin + +=end + +=head2 for w/o formatter + +=for + +something... + =head2 Nested sequences of the same type C>> @@ -80,6 +99,9 @@ C>> E E> E> +E<0x100> +E<07777> +E<300> =head2 Unresolved internal links @@ -92,12 +114,15 @@ L L L<> +L< aha> +L L<"Warnings"> this one is ok +L ok too, this POD has an X of the same name =head2 Warnings L -L< some text|page/"section" > +L should give warnings as hell =over 4 @@ -105,17 +130,80 @@ L< some text|page/"section" > =back 200 +the 200 is evil + =begin html What? =end xml +Xsee these unescaped < and > in the text? + +=head2 Misc + +Z should be empty + +X<> should not be empty + +=over four + +This paragrapgh is misplaced - it ought to be an item. + +=item four should be numeric! + +=item + +=item blah + +=item previous is all empty!!! + +=back + +All empty over/back: + +=over 4 + +=back + +item w/o name + +=cut + +=pod bla + +bla is evil + +=cut blub + +blub is evil + +=head2 reoccurence + =over 4 +=item Misc + +we already have a head Misc + =back -see these unescaped < and > in the text? +=head2 some heading + +=head2 another one + +previous section is empty! + +=head1 LINK TESTS + +Due to bug reported by Rafael Garcia-Suarez "rgarciasuarez@free.fr": + +The following hyperlinks : +L<"I/O Operators"> +L +trigger a podchecker warning (using bleadperl) : + node 'I/O Operators' contains non-escaped | or / =cut +