Commit | Line | Data |
---|---|---|
360aca43 | 1 | BEGIN { |
9c6ed6d7 | 2 | use File::Basename; |
3 | my $THISDIR = dirname $0; | |
4 | unshift @INC, $THISDIR; | |
360aca43 | 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 | ||
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 | ||
24 | poderrors.t - test Pod::Checker on some pod syntax errors | |
25 | ||
26 | =unknown1 this is an unknown command with two N<unknownA> | |
27 | and D<unknownB> interior sequences. | |
28 | ||
29 | This is some paragraph text with some unknown interior sequences, | |
30 | such as Q<unknown2>, | |
31 | A<unknown3>, | |
32 | and Y<unknown4 V<unknown5>>. | |
33 | ||
34 | Now try some unterminated sequences like | |
35 | I<hello mudda! | |
36 | B<hello fadda! | |
37 | ||
38 | Here I am at C<camp granada! | |
39 | ||
40 | Camps is very, | |
41 | entertaining. | |
42 | And they say we'll have some fun if it stops raining! | |
43 | ||
66aff6dd | 44 | Okay, now use a non-empty blank line to terminate a paragraph and make |
45 | sure we get a warning. | |
46 | ||
47 | The 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 | 79 | second 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 | ||
91 | something... | |
92 | ||
e3237417 | 93 | =head2 Nested sequences of the same type |
94 | ||
95 | C<code I<italic C<code again!>>> | |
96 | ||
97 | =head2 Garbled entities | |
98 | ||
99 | E<alea iacta est> | |
100 | E<C<auml>> | |
101 | E<abcI<bla>> | |
92e3d63a | 102 | E<0x100> |
103 | E<07777> | |
104 | E<300> | |
e3237417 | 105 | |
106 | =head2 Unresolved internal links | |
107 | ||
108 | L</"begin or begin"> | |
109 | L<"end with begin"> | |
110 | L</OoPs> | |
111 | ||
e2c3adef | 112 | =head2 Some links with problems |
e3237417 | 113 | |
e2c3adef | 114 | L<abc |
115 | def> | |
116 | L<> | |
92e3d63a | 117 | L< aha> |
118 | L<oho > | |
e2c3adef | 119 | L<"Warnings"> this one is ok |
92e3d63a | 120 | L</unescaped> ok too, this POD has an X of the same name |
e3237417 | 121 | |
122 | =head2 Warnings | |
123 | ||
124 | L<passwd(5)> | |
92e3d63a | 125 | L<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 | 133 | the 200 is evil |
134 | ||
e3237417 | 135 | =begin html |
136 | ||
137 | What? | |
138 | ||
139 | =end xml | |
140 | ||
92e3d63a | 141 | X<unescaped>see these unescaped < and > in the text? |
142 | ||
143 | =head2 Misc | |
144 | ||
145 | Z<ddd> should be empty | |
146 | ||
147 | X<> should not be empty | |
148 | ||
149 | =over four | |
150 | ||
151 | This 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 | ||
163 | All empty over/back: | |
164 | ||
165 | =over 4 | |
166 | ||
167 | =back | |
168 | ||
169 | item w/o name | |
170 | ||
171 | =cut | |
172 | ||
173 | =pod bla | |
174 | ||
175 | bla is evil | |
176 | ||
177 | =cut blub | |
178 | ||
179 | blub is evil | |
180 | ||
9c6ed6d7 | 181 | =head2 reoccurence |
92e3d63a | 182 | |
e3237417 | 183 | =over 4 |
184 | ||
92e3d63a | 185 | =item Misc |
186 | ||
187 | we already have a head Misc | |
188 | ||
e3237417 | 189 | =back |
190 | ||
92e3d63a | 191 | =head2 some heading |
192 | ||
193 | =head2 another one | |
194 | ||
195 | previous section is empty! | |
e3237417 | 196 | |
9c6ed6d7 | 197 | =head1 LINK TESTS |
198 | ||
199 | Due to bug reported by Rafael Garcia-Suarez "rgarciasuarez@free.fr": | |
200 | ||
201 | The following hyperlinks : | |
202 | L<"I/O Operators"> | |
203 | L<perlop/"I/O Operators"> | |
204 | trigger a podchecker warning (using bleadperl) : | |
205 | node 'I/O Operators' contains non-escaped | or / | |
206 | ||
360aca43 | 207 | =cut |
e3237417 | 208 | |
92e3d63a | 209 |