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