Update to Pod::Parser 1.17, from Brad Appleton.
[p5sagit/p5-mst-13.2.git] / t / pod / poderrs.t
1 BEGIN {
2    use File::Basename;
3    my $THISDIR = dirname $0;
4    unshift @INC, $THISDIR;
5    require "testpchk.pl";
6    import TestPodChecker;
7 }
8
9 my %options = map { $_ => 1 } @ARGV;  ## convert cmdline to options-hash
10 my $passed  = testpodchecker \%options, $0;
11 exit( ($passed == 1) ? 0 : -1 )  unless $ENV{HARNESS_ACTIVE};
12
13 ### Deliberately throw in some blank but non-empty lines
14                                         
15 ### The above line should contain spaces
16
17
18 __END__
19
20
21 =head1 NAME
22
23 poderrors.t - test Pod::Checker on some pod syntax errors
24
25 =unknown1 this is an unknown command with two N<unknownA>
26 and D<unknownB> interior sequences.
27
28 This is some paragraph text with some unknown interior sequences,
29 such as Q<unknown2>,
30 A<unknown3>,
31 and Y<unknown4 V<unknown5>>.
32
33 Now try some unterminated sequences like
34 I<hello mudda!
35 B<hello fadda!
36
37 Here I am at C<camp granada!
38
39 Camps is very,
40 entertaining.
41 And they say we'll have some fun if it stops raining!
42
43 Okay, now use a non-empty blank line to terminate a paragraph and make
44 sure we get a warning.
45                                                 
46 The above blank line contains tabs and spaces only
47
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
62 =item aaps
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
78 second 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
90 something...
91
92 =head2 Nested sequences of the same type
93
94 C<code I<italic C<code again!>>>
95
96 =head2 Garbled entities
97
98 E<alea iacta est>
99 E<C<auml>>
100 E<abcI<bla>>
101 E<0x100>
102 E<07777>
103 E<300>
104
105 =head2 Unresolved internal links
106
107 L</"begin or begin">
108 L<"end with begin">
109 L</OoPs>
110
111 =head2 Some links with problems
112
113 L<abc
114 def>
115 L<>
116 L<   aha>
117 L<oho   >
118 L<"Warnings"> this one is ok
119 L</unescaped> ok too, this POD has an X of the same name
120
121 =head2 Warnings
122
123 L<passwd(5)>
124 L<some text with / in it|perlvar/$|> should give warnings as hell
125
126 =over 4
127
128 =item bla
129
130 =back 200
131
132 the 200 is evil
133
134 =begin html
135
136 What?
137
138 =end xml
139
140 X<unescaped>see these unescaped < and > in the text?
141
142 =head2 Misc
143
144 Z<ddd> should be empty
145
146 X<> should not be empty
147
148 =over four
149
150 This 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
162 All empty over/back:
163
164 =over 4
165
166 =back
167
168 item w/o name
169
170 =cut
171
172 =pod bla
173
174 bla is evil
175
176 =cut blub
177
178 blub is evil
179
180 =head2 reoccurence
181
182 =over 4
183
184 =item Misc
185
186 we already have a head Misc
187
188 =back
189
190 =head2 some heading
191
192 =head2 another one
193
194 previous section is empty!
195
196 =cut
197
198