BEGIN { use File::Basename; my $THISDIR = dirname $0; unshift @INC, $THISDIR; require "testpchk.pl"; import TestPodChecker; } 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 #line 18 __END__ =head2 This should cause a warning =head1 NAME poderrors.t - test Pod::Checker on some pod syntax errors GASP! A verbatim paragraph in NAME =unknown1 this is an unknown command with two N and D interior sequences. This is some paragraph text with some unknown interior sequences, such as Q, A, and Y>. Now try some unterminated sequences like I>>>>>>>>>>> A L to L> =head1 Additional tests =head2 item without over =item oops =head2 back without over =back =head2 over without back =over 4 =item aaps =head2 end without begin =end =end something =head2 begin and begin =begin html =begin text =end text =end html =head2 begin w/o formatter =begin =end =head2 for w/o formatter =for something... =head2 Nested sequences of the same type C>> =head2 Garbled entities E E> E> E<0x100> E<07777> E<300> E =head2 Unresolved internal links L L<"end with begin"> L =head2 Some links with problems L L<> L< aha> L L< weehee > L<"Warnings"> this one is ok L ok too, this POD has an X of the same name L<< lead >> L<< trail >> L<< neither >> L<<< both >>> L<<<<>>>> L<<<< >>>> L<<<< >>>> =head2 Warnings L L should give warnings as hell =over 4 =item bla =back 200 the 200 is evil Xsee these unescaped < and > in the text? =head2 Misc Z should be empty X<> should not be empty X<0> should not generate a warning about being empty E<> should not be empty =over four This paragrapgh is misplaced - it ought to be an item. =item four should be numeric! =back =over 4 =item =item blah =item previous is all empty!!! =back =over This verbatim paragraph should not be here. Spaces are on the line below this =item * bullet =item 1 number, uh oh =back =over =item * first bullet =item 1 then number =item finally definition =back =over =item 1 first number =item 3 bad numbering =item then definition =item * finally bullet =back =over =item first defintion =item * then bullet =item 1 finally number =item second definition This should not generate an empty =item warning, because it has verbatim text. =back Empty over/back: =over 4 =over 2 =back =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 =head2 some heading =head2 another one previous section is empty! =head1 LINK TESTS L don't trigger a warning because node is quoted L<"I/O Operators"> incorrectly interpreted as 'O Operators in I', but this is deprecated syntax, as per perlpodspec. no warning due to quotes =head1 Empty head above and unclosed over/begins below =head3 test X I =over =begin html What? =begin :xml L, so should generate a warning =cut