Commit | Line | Data |
---|---|---|
360aca43 | 1 | BEGIN { |
dbd1b0a2 | 2 | chdir 't' if -d 't'; |
3 | unshift @INC, '../lib'; | |
4 | unshift @INC, './pod'; | |
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 | ||
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 | ||
66aff6dd | 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 | ||
e3237417 | 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 | 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 | 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 | ||
e3237417 | 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>> | |
92e3d63a | 101 | E<0x100> |
102 | E<07777> | |
103 | E<300> | |
e3237417 | 104 | |
105 | =head2 Unresolved internal links | |
106 | ||
107 | L</"begin or begin"> | |
108 | L<"end with begin"> | |
109 | L</OoPs> | |
110 | ||
e2c3adef | 111 | =head2 Some links with problems |
e3237417 | 112 | |
e2c3adef | 113 | L<abc |
114 | def> | |
115 | L<> | |
92e3d63a | 116 | L< aha> |
117 | L<oho > | |
e2c3adef | 118 | L<"Warnings"> this one is ok |
92e3d63a | 119 | L</unescaped> ok too, this POD has an X of the same name |
e3237417 | 120 | |
121 | =head2 Warnings | |
122 | ||
123 | L<passwd(5)> | |
92e3d63a | 124 | L<some text with / in it|perlvar/$|> should give warnings as hell |
e3237417 | 125 | |
126 | =over 4 | |
127 | ||
128 | =item bla | |
129 | ||
130 | =back 200 | |
131 | ||
92e3d63a | 132 | the 200 is evil |
133 | ||
e3237417 | 134 | =begin html |
135 | ||
136 | What? | |
137 | ||
138 | =end xml | |
139 | ||
92e3d63a | 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 | ||
e3237417 | 182 | =over 4 |
183 | ||
92e3d63a | 184 | =item Misc |
185 | ||
186 | we already have a head Misc | |
187 | ||
e3237417 | 188 | =back |
189 | ||
92e3d63a | 190 | =head2 some heading |
191 | ||
192 | =head2 another one | |
193 | ||
194 | previous section is empty! | |
e3237417 | 195 | |
360aca43 | 196 | =cut |
e3237417 | 197 | |
92e3d63a | 198 |