1N/ABEGIN {
1N/A use File::Basename;
1N/A my $THISDIR = dirname $0;
1N/A unshift @INC, $THISDIR;
1N/A require "testpchk.pl";
1N/A import TestPodChecker;
1N/A}
1N/A
1N/Amy %options = map { $_ => 1 } @ARGV; ## convert cmdline to options-hash
1N/Amy $passed = testpodchecker \%options, $0;
1N/Aexit( ($passed == 1) ? 0 : -1 ) unless $ENV{HARNESS_ACTIVE};
1N/A
1N/A### Deliberately throw in some blank but non-empty lines
1N/A
1N/A### The above line should contain spaces
1N/A
1N/A
1N/A__END__
1N/A
1N/A=head2 This should cause a warning
1N/A
1N/A=head1 NAME
1N/A
1N/Apoderrors.t - test Pod::Checker on some pod syntax errors
1N/A
1N/A=unknown1 this is an unknown command with two N<unknownA>
1N/Aand D<unknownB> interior sequences.
1N/A
1N/AThis is some paragraph text with some unknown interior sequences,
1N/Asuch as Q<unknown2>,
1N/AA<unknown3>,
1N/Aand Y<unknown4 V<unknown5>>.
1N/A
1N/ANow try some unterminated sequences like
1N/AI<hello mudda!
1N/AB<hello fadda!
1N/A
1N/AHere I am at C<camp granada!
1N/A
1N/ACamps is very,
1N/Aentertaining.
1N/AAnd they say we'll have some fun if it stops raining!
1N/A
1N/AOkay, now use a non-empty blank line to terminate a paragraph and make
1N/Asure we get a warning.
1N/A
1N/AThe above blank line contains tabs and spaces only
1N/A
1N/A=head1 Additional tests
1N/A
1N/A=head2 item without over
1N/A
1N/A=item oops
1N/A
1N/A=head2 back without over
1N/A
1N/A=back
1N/A
1N/A=head2 over without back
1N/A
1N/A=over 4
1N/A
1N/A=item aaps
1N/A
1N/A=head2 end without begin
1N/A
1N/A=end
1N/A
1N/A=head2 begin and begin
1N/A
1N/A=begin html
1N/A
1N/A=begin text
1N/A
1N/A=end
1N/A
1N/A=end
1N/A
1N/Asecond one results in end w/o begin
1N/A
1N/A=head2 begin w/o formatter
1N/A
1N/A=begin
1N/A
1N/A=end
1N/A
1N/A=head2 for w/o formatter
1N/A
1N/A=for
1N/A
1N/Asomething...
1N/A
1N/A=head2 Nested sequences of the same type
1N/A
1N/AC<code I<italic C<code again!>>>
1N/A
1N/A=head2 Garbled entities
1N/A
1N/AE<alea iacta est>
1N/AE<C<auml>>
1N/AE<abcI<bla>>
1N/AE<0x100>
1N/AE<07777>
1N/AE<300>
1N/A
1N/A=head2 Unresolved internal links
1N/A
1N/AL</"begin or begin">
1N/AL<"end with begin">
1N/AL</OoPs>
1N/A
1N/A=head2 Some links with problems
1N/A
1N/AL<abc
1N/Adef>
1N/AL<>
1N/AL< aha>
1N/AL<oho >
1N/AL<"Warnings"> this one is ok
1N/AL</unescaped> ok too, this POD has an X of the same name
1N/A
1N/A=head2 Warnings
1N/A
1N/AL<passwd(5)>
1N/AL<some text with / in it|perlvar/$|> should give warnings as hell
1N/A
1N/A=over 4
1N/A
1N/A=item bla
1N/A
1N/A=back 200
1N/A
1N/Athe 200 is evil
1N/A
1N/A=begin html
1N/A
1N/AWhat?
1N/A
1N/A=end xml
1N/A
1N/AX<unescaped>see these unescaped < and > in the text?
1N/A
1N/A=head2 Misc
1N/A
1N/AZ<ddd> should be empty
1N/A
1N/AX<> should not be empty
1N/A
1N/A=over four
1N/A
1N/AThis paragrapgh is misplaced - it ought to be an item.
1N/A
1N/A=item four should be numeric!
1N/A
1N/A=item
1N/A
1N/A=item blah
1N/A
1N/A=item previous is all empty!!!
1N/A
1N/A=back
1N/A
1N/AAll empty over/back:
1N/A
1N/A=over 4
1N/A
1N/A=back
1N/A
1N/Aitem w/o name
1N/A
1N/A=cut
1N/A
1N/A=pod bla
1N/A
1N/Abla is evil
1N/A
1N/A=cut blub
1N/A
1N/Ablub is evil
1N/A
1N/A=head2 reoccurence
1N/A
1N/A=over 4
1N/A
1N/A=item Misc
1N/A
1N/Awe already have a head Misc
1N/A
1N/A=back
1N/A
1N/A=head2 some heading
1N/A
1N/A=head2 another one
1N/A
1N/Aprevious section is empty!
1N/A
1N/A=head1 LINK TESTS
1N/A
1N/ADue to bug reported by Rafael Garcia-Suarez "rgarciasuarez@free.fr":
1N/A
1N/AThe following hyperlinks :
1N/AL<"I/O Operators">
1N/AL<perlop/"I/O Operators">
1N/Atrigger a podchecker warning (using bleadperl) :
1N/A node 'I/O Operators' contains non-escaped | or /
1N/A
1N/A=cut
1N/A
1N/A