FreeBSD $0 dance.
[p5sagit/p5-mst-13.2.git] / t / pod / poderrs.t
CommitLineData
360aca43 1BEGIN {
9c6ed6d7 2 use File::Basename;
3 my $THISDIR = dirname $0;
4 unshift @INC, $THISDIR;
360aca43 5 require "testpchk.pl";
6 import TestPodChecker;
7}
8
9my %options = map { $_ => 1 } @ARGV; ## convert cmdline to options-hash
10my $passed = testpodchecker \%options, $0;
11exit( ($passed == 1) ? 0 : -1 ) unless $ENV{HARNESS_ACTIVE};
12
48f30392 13### Deliberately throw in some blank but non-empty lines
14
15### The above line should contain spaces
16
360aca43 17
18__END__
19
9c6ed6d7 20=head2 This should cause a warning
360aca43 21
22=head1 NAME
23
24poderrors.t - test Pod::Checker on some pod syntax errors
25
26=unknown1 this is an unknown command with two N<unknownA>
27and D<unknownB> interior sequences.
28
29This is some paragraph text with some unknown interior sequences,
30such as Q<unknown2>,
31A<unknown3>,
32and Y<unknown4 V<unknown5>>.
33
34Now try some unterminated sequences like
35I<hello mudda!
36B<hello fadda!
37
38Here I am at C<camp granada!
39
40Camps is very,
41entertaining.
42And they say we'll have some fun if it stops raining!
43
66aff6dd 44Okay, now use a non-empty blank line to terminate a paragraph and make
45sure we get a warning.
46
47The above blank line contains tabs and spaces only
48
e3237417 49=head1 Additional tests
50
51=head2 item without over
52
53=item oops
54
55=head2 back without over
56
57=back
58
59=head2 over without back
60
61=over 4
62
92e3d63a 63=item aaps
e3237417 64
65=head2 end without begin
66
67=end
68
69=head2 begin and begin
70
71=begin html
72
73=begin text
74
75=end
76
77=end
78
92e3d63a 79second one results in end w/o begin
80
81=head2 begin w/o formatter
82
83=begin
84
85=end
86
87=head2 for w/o formatter
88
89=for
90
91something...
92
e3237417 93=head2 Nested sequences of the same type
94
95C<code I<italic C<code again!>>>
96
97=head2 Garbled entities
98
99E<alea iacta est>
100E<C<auml>>
101E<abcI<bla>>
92e3d63a 102E<0x100>
103E<07777>
104E<300>
e3237417 105
106=head2 Unresolved internal links
107
108L</"begin or begin">
109L<"end with begin">
110L</OoPs>
111
e2c3adef 112=head2 Some links with problems
e3237417 113
e2c3adef 114L<abc
115def>
116L<>
92e3d63a 117L< aha>
118L<oho >
e2c3adef 119L<"Warnings"> this one is ok
92e3d63a 120L</unescaped> ok too, this POD has an X of the same name
e3237417 121
122=head2 Warnings
123
124L<passwd(5)>
92e3d63a 125L<some text with / in it|perlvar/$|> should give warnings as hell
e3237417 126
127=over 4
128
129=item bla
130
131=back 200
132
92e3d63a 133the 200 is evil
134
e3237417 135=begin html
136
137What?
138
139=end xml
140
92e3d63a 141X<unescaped>see these unescaped < and > in the text?
142
143=head2 Misc
144
145Z<ddd> should be empty
146
147X<> should not be empty
148
149=over four
150
151This paragrapgh is misplaced - it ought to be an item.
152
153=item four should be numeric!
154
155=item
156
157=item blah
158
159=item previous is all empty!!!
160
161=back
162
163All empty over/back:
164
165=over 4
166
167=back
168
169item w/o name
170
171=cut
172
173=pod bla
174
175bla is evil
176
177=cut blub
178
179blub is evil
180
9c6ed6d7 181=head2 reoccurence
92e3d63a 182
e3237417 183=over 4
184
92e3d63a 185=item Misc
186
187we already have a head Misc
188
e3237417 189=back
190
92e3d63a 191=head2 some heading
192
193=head2 another one
194
195previous section is empty!
e3237417 196
9c6ed6d7 197=head1 LINK TESTS
198
199Due to bug reported by Rafael Garcia-Suarez "rgarciasuarez@free.fr":
200
201The following hyperlinks :
202L<"I/O Operators">
203L<perlop/"I/O Operators">
204trigger a podchecker warning (using bleadperl) :
205 node 'I/O Operators' contains non-escaped | or /
206
360aca43 207=cut
e3237417 208
92e3d63a 209