Commit | Line | Data |
351625bd |
1 | BEGIN { |
2 | if($ENV{PERL_CORE}) { |
3 | chdir 't'; |
4 | @INC = '../lib'; |
5 | } |
6 | } |
7 | |
8 | use strict; |
9 | use Test; |
69473a20 |
10 | BEGIN { plan tests => 99 }; |
351625bd |
11 | |
12 | #use Pod::Simple::Debug (10); |
13 | |
14 | ok 1; |
15 | |
16 | use Pod::Simple::DumpAsXML; |
17 | use Pod::Simple::XMLOutStream; |
18 | print "# Pod::Simple version $Pod::Simple::VERSION\n"; |
19 | sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) } |
20 | my $x = 'Pod::Simple::XMLOutStream'; |
21 | |
22 | print "##### Testing L codes via x class $x...\n"; |
23 | |
24 | $Pod::Simple::XMLOutStream::ATTR_PAD = ' '; |
25 | $Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output |
26 | |
27 | print "# Simple/moderate L<stuff> tests...\n"; |
28 | |
29 | ok($x->_out(qq{=pod\n\nL<Net::Ping>\n}), |
30 | '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>' |
31 | ); |
32 | |
33 | ok($x->_out(qq{=pod\n\nL<crontab(5)>\n}), |
34 | '<Document><Para><L content-implicit="yes" to="crontab(5)" type="man">crontab(5)</L></Para></Document>' |
35 | ); |
36 | |
37 | ok( $x->_out(qq{=pod\n\nL<Net::Ping/Ping-pong>\n}), |
38 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>' |
39 | ); |
40 | |
41 | ok( $x->_out(qq{=pod\n\nL<Net::Ping/"Ping-pong">\n}), |
42 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>' |
43 | ); |
44 | |
45 | ok( $x->_out(qq{=pod\n\nL</"Object Methods">\n}), |
46 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
47 | ); |
48 | ok( $x->_out(qq{=pod\n\nL</Object Methods>\n}), |
49 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
50 | ); |
51 | ok( $x->_out(qq{=pod\n\nL<"Object Methods">\n}), |
52 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
53 | ); |
54 | |
55 | |
56 | print "# Complex L<stuff> tests...\n"; |
57 | print "# Ents in the middle...\n"; |
58 | |
59 | ok($x->_out(qq{=pod\n\nL<Net::Ping>\n}), |
60 | '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>' |
61 | ); |
62 | ok( $x->_out(qq{=pod\n\nL<Net::Ping/Ping-E<112>ong>\n}), |
63 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>' |
64 | ); |
65 | ok( $x->_out(qq{=pod\n\nL<Net::Ping/"Ping-E<112>ong">\n}), |
66 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>' |
67 | ); |
68 | |
69 | ok( $x->_out(qq{=pod\n\nL</"Object E<77>ethods">\n}), |
70 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
71 | ); |
72 | ok( $x->_out(qq{=pod\n\nL</Object E<77>ethods>\n}), |
73 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
74 | ); |
75 | ok( $x->_out(qq{=pod\n\nL<"Object E<77>ethods">\n}), |
76 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
77 | ); |
78 | |
79 | |
80 | |
81 | print "# Ents in the middle and at the start...\n"; |
82 | |
83 | ok($x->_out(qq{=pod\n\nL<E<78>et::Ping>\n}), |
84 | '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>' |
85 | ); |
86 | ok( $x->_out(qq{=pod\n\nL<E<78>et::Ping/Ping-E<112>ong>\n}), |
87 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>' |
88 | ); |
89 | ok( $x->_out(qq{=pod\n\nL<E<78>et::Ping/"Ping-E<112>ong">\n}), |
90 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>' |
91 | ); |
92 | |
93 | ok( $x->_out(qq{=pod\n\nL</"E<79>bject E<77>ethods">\n}), |
94 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
95 | ); |
96 | ok( $x->_out(qq{=pod\n\nL</E<79>bject E<77>ethods>\n}), |
97 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
98 | ); |
99 | ok( $x->_out(qq{=pod\n\nL<"E<79>bject E<77>ethods">\n}), |
100 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
101 | ); |
102 | |
103 | |
104 | print "# Ents in the middle and at the start and at the end...\n"; |
105 | |
106 | ok($x->_out(qq{=pod\n\nL<E<78>et::PinE<103>>\n}), |
107 | '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>' |
108 | ); |
109 | ok( $x->_out(qq{=pod\n\nL<E<78>et::PinE<103>/Ping-E<112>onE<103>>\n}), |
110 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>' |
111 | ); |
112 | ok( $x->_out(qq{=pod\n\nL<E<78>et::PinE<103>/"Ping-E<112>onE<103>">\n}), |
113 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>' |
114 | ); |
115 | |
116 | ok( $x->_out(qq{=pod\n\nL</"E<79>bject E<77>ethodE<115>">\n}), |
117 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
118 | ); |
119 | ok( $x->_out(qq{=pod\n\nL</E<79>bject E<77>ethodE<115>>\n}), |
120 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
121 | ); |
122 | ok( $x->_out(qq{=pod\n\nL<"E<79>bject E<77>ethodE<115>">\n}), |
123 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
124 | ); |
125 | |
126 | |
127 | print "# Even more complex L<stuff> tests...\n"; |
128 | |
129 | |
130 | print "# Ents in the middle...\n"; |
131 | |
132 | ok($x->_out(qq{=pod\n\nL<Net::Ping>\n}), |
133 | '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>' |
134 | ); |
135 | ok( $x->_out(qq{=pod\n\nL<Net::Ping/Ping-E<112>ong>\n}), |
136 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>' |
137 | ); |
138 | ok( $x->_out(qq{=pod\n\nL<Net::Ping/"Ping-E<112>ong">\n}), |
139 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-pong" in Net::Ping</L></Para></Document>' |
140 | ); |
141 | |
142 | ok( $x->_out(qq{=pod\n\nL</"Object E<77>ethods">\n}), |
143 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
144 | ); |
145 | ok( $x->_out(qq{=pod\n\nL</Object E<77>ethods>\n}), |
146 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
147 | ); |
148 | ok( $x->_out(qq{=pod\n\nL<"Object E<77>ethods">\n}), |
149 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"Object Methods"</L></Para></Document>' |
150 | ); |
151 | |
152 | |
153 | ########################################################################### |
154 | |
155 | print "# VERY complex L sequences...\n"; |
156 | print "# Ents in the middle and at the start...\n"; |
157 | |
158 | |
159 | ok($x->_out(qq{=pod\n\nL<Net::Ping>\n}), |
160 | '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>' |
161 | ); |
162 | ok( $x->_out(qq{=pod\n\nL<Net::Ping/Ping-B<E<112>ong>>\n}), |
163 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>' |
164 | ); |
165 | ok( $x->_out(qq{=pod\n\nL<Net::Ping/"Ping-B<E<112>ong>">\n}), |
166 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>' |
167 | ); |
168 | |
169 | ok( $x->_out(qq{=pod\n\nL</"B<Object> E<77>ethods">\n}), |
170 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>' |
171 | ); |
172 | ok( $x->_out(qq{=pod\n\nL</B<Object> E<77>ethods>\n}), |
173 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>' |
174 | ); |
175 | ok( $x->_out(qq{=pod\n\nL<"B<Object> E<77>ethods">\n}), |
176 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>' |
177 | ); |
178 | |
179 | |
180 | |
181 | print "# Ents in the middle and at the start...\n"; |
182 | |
183 | ok($x->_out(qq{=pod\n\nL<E<78>et::Ping>\n}), |
184 | '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>' |
185 | ); |
186 | ok( $x->_out(qq{=pod\n\nL<E<78>et::Ping/Ping-B<E<112>ong>>\n}), |
187 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>' |
188 | ); |
189 | ok( $x->_out(qq{=pod\n\nL<E<78>et::Ping/"Ping-B<E<112>ong>">\n}), |
190 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>' |
191 | ); |
192 | |
193 | ok( $x->_out(qq{=pod\n\nL</"B<E<79>bject> E<77>ethods">\n}), |
194 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>' |
195 | ); |
196 | ok( $x->_out(qq{=pod\n\nL</B<E<79>bject> E<77>ethods>\n}), |
197 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>' |
198 | ); |
199 | ok( $x->_out(qq{=pod\n\nL<"B<E<79>bject> E<77>ethods">\n}), |
200 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>' |
201 | ); |
202 | |
203 | |
204 | print "# Ents in the middle and at the start and at the end...\n"; |
205 | |
206 | ok($x->_out(qq{=pod\n\nL<E<78>et::PinE<103>>\n}), |
207 | '<Document><Para><L content-implicit="yes" to="Net::Ping" type="pod">Net::Ping</L></Para></Document>' |
208 | ); |
209 | ok( $x->_out(qq{=pod\n\nL<E<78>et::PinE<103>/Ping-B<E<112>onE<103>>>\n}), |
210 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>' |
211 | ); |
212 | ok( $x->_out(qq{=pod\n\nL<E<78>et::PinE<103>/"Ping-B<E<112>onE<103>>">\n}), |
213 | '<Document><Para><L content-implicit="yes" section="Ping-pong" to="Net::Ping" type="pod">"Ping-<B>pong</B>" in Net::Ping</L></Para></Document>' |
214 | ); |
215 | |
216 | ok( $x->_out(qq{=pod\n\nL</"B<E<79>bject> E<77>ethodE<115>">\n}), |
217 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>' |
218 | ); |
219 | ok( $x->_out(qq{=pod\n\nL</B<E<79>bject> E<77>ethodE<115>>\n}), |
220 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>' |
221 | ); |
222 | ok( $x->_out(qq{=pod\n\nL<"B<E<79>bject> E<77>ethodE<115>">\n}), |
223 | '<Document><Para><L content-implicit="yes" section="Object Methods" type="pod">"<B>Object</B> Methods"</L></Para></Document>' |
224 | ); |
225 | |
226 | |
227 | ########################################################################### |
228 | |
229 | print "#\n# L<url> tests...\n"; |
230 | |
231 | ok( $x->_out(qq{=pod\n\nL<news:comp.lang.perl.misc>\n}), |
232 | '<Document><Para><L content-implicit="yes" to="news:comp.lang.perl.misc" type="url">news:comp.lang.perl.misc</L></Para></Document>' |
233 | ); |
234 | ok( $x->_out(qq{=pod\n\nL<http://www.perl.com>\n}), |
235 | '<Document><Para><L content-implicit="yes" to="http://www.perl.com" type="url">http://www.perl.com</L></Para></Document>' |
236 | ); |
237 | ok( $x->_out(qq{=pod\n\nL<http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/>\n}), |
238 | '<Document><Para><L content-implicit="yes" to="http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/" type="url">http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/</L></Para></Document>' |
239 | ); |
240 | |
241 | print "# L<url> tests with entities...\n"; |
242 | |
243 | ok( $x->_out(qq{=pod\n\nL<news:compE<46>lang.perl.misc>\n}), |
244 | '<Document><Para><L content-implicit="yes" to="news:comp.lang.perl.misc" type="url">news:comp.lang.perl.misc</L></Para></Document>' |
245 | ); |
246 | ok( $x->_out(qq{=pod\n\nL<http://wwwE<46>perl.com>\n}), |
247 | '<Document><Para><L content-implicit="yes" to="http://www.perl.com" type="url">http://www.perl.com</L></Para></Document>' |
248 | ); |
249 | ok( $x->_out(qq{=pod\n\nL<http://wwwE<46>perl.com/CPAN/authors/id/S/SB/SBURKE/>\n}), |
250 | '<Document><Para><L content-implicit="yes" to="http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/" type="url">http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/</L></Para></Document>' |
251 | ); |
252 | ok( $x->_out(qq{=pod\n\nL<http://wwwE<46>perl.com/CPAN/authors/id/S/SB/SBURKEE<47>>\n}), |
253 | '<Document><Para><L content-implicit="yes" to="http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/" type="url">http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/</L></Para></Document>' |
254 | ); |
255 | |
256 | |
257 | ########################################################################### |
258 | |
259 | |
260 | print "# L<text|stuff> tests...\n"; |
261 | |
262 | ok($x->_out(qq{=pod\n\nL<things|crontab(5)>\n}), |
263 | '<Document><Para><L to="crontab(5)" type="man">things</L></Para></Document>' |
264 | ); |
265 | ok($x->_out(qq{=pod\n\nL<things|crontab(5)/ENVIRONMENT>\n}), |
266 | '<Document><Para><L section="ENVIRONMENT" to="crontab(5)" type="man">things</L></Para></Document>' |
267 | ); |
268 | ok($x->_out(qq{=pod\n\nL<things|crontab(5)/"ENVIRONMENT">\n}), |
269 | '<Document><Para><L section="ENVIRONMENT" to="crontab(5)" type="man">things</L></Para></Document>' |
270 | ); |
271 | |
272 | ok( $x->_out(qq{=pod\n\nL<Perl Error Messages|perldiag>\n}), |
273 | '<Document><Para><L to="perldiag" type="pod">Perl Error Messages</L></Para></Document>' |
274 | ); |
275 | ok( $x->_out(qq{=pod\n\nL<Perl\nError\nMessages|perldiag>\n}), |
276 | '<Document><Para><L to="perldiag" type="pod">Perl Error Messages</L></Para></Document>' |
277 | ); |
278 | ok( $x->_out(qq{=pod\n\nL<Perl\nError\t Messages|perldiag>\n}), |
279 | '<Document><Para><L to="perldiag" type="pod">Perl Error Messages</L></Para></Document>' |
280 | ); |
281 | |
282 | |
283 | ok( $x->_out(qq{=pod\n\nL<SWITCH statements|perlsyn/"Basic BLOCKs and Switch Statements">\n}), |
284 | '<Document><Para><L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH statements</L></Para></Document>' |
285 | ); |
286 | ok( $x->_out(qq{=pod\n\nL<SWITCH statements|perlsyn/Basic BLOCKs and Switch Statements>\n}), |
287 | '<Document><Para><L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH statements</L></Para></Document>' |
288 | ); |
289 | |
290 | |
291 | ok( $x->_out(qq{=pod\n\nL<the various attributes|/"Member Data">\n}), |
292 | '<Document><Para><L section="Member Data" type="pod">the various attributes</L></Para></Document>' |
293 | ); |
294 | ok( $x->_out(qq{=pod\n\nL<the various attributes|/Member Data>\n}), |
295 | '<Document><Para><L section="Member Data" type="pod">the various attributes</L></Para></Document>' |
296 | ); |
297 | ok( $x->_out(qq{=pod\n\nL<the various attributes|"Member Data">\n}), |
298 | '<Document><Para><L section="Member Data" type="pod">the various attributes</L></Para></Document>' |
299 | ); |
300 | |
301 | |
302 | print "#\n# Now some very complex L<text|stuff> tests...\n"; |
303 | |
304 | |
305 | ok( $x->_out(qq{=pod\n\nL<Perl B<Error E<77>essages>|perldiag>\n}), |
306 | '<Document><Para><L to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>' |
307 | ); |
308 | ok( $x->_out(qq{=pod\n\nL<Perl\nB<Error\nE<77>essages>|perldiag>\n}), |
309 | '<Document><Para><L to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>' |
310 | ); |
311 | ok( $x->_out(qq{=pod\n\nL<Perl\nB<Error\t E<77>essages>|perldiag>\n}), |
312 | '<Document><Para><L to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>' |
313 | ); |
314 | |
315 | |
316 | ok( $x->_out(qq{=pod\n\nL<SWITCH B<E<115>tatements>|perlsyn/"Basic I<BLOCKs> and Switch StatementE<115>">\n}), |
317 | '<Document><Para><L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L></Para></Document>' |
318 | ); |
319 | ok( $x->_out(qq{=pod\n\nL<SWITCH B<E<115>tatements>|perlsyn/Basic I<BLOCKs> and Switch StatementE<115>>\n}), |
320 | '<Document><Para><L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L></Para></Document>' |
321 | ); |
322 | |
323 | |
324 | ok( $x->_out(qq{=pod\n\nL<the F<various> attributes|/"Member Data">\n}), |
325 | '<Document><Para><L section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>' |
326 | ); |
327 | ok( $x->_out(qq{=pod\n\nL<the F<various> attributes|/Member Data>\n}), |
328 | '<Document><Para><L section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>' |
329 | ); |
330 | ok( $x->_out(qq{=pod\n\nL<the F<various> attributes|"Member Data">\n}), |
331 | '<Document><Para><L section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>' |
332 | ); |
333 | |
334 | |
335 | print "#\n# Now some very complex L<text|stuff> tests with variant syntax...\n"; |
336 | |
337 | |
338 | ok( $x->_out(qq{=pod\n\nL<< Perl B<<< Error E<77>essages >>>|perldiag >>\n}), |
339 | '<Document><Para><L to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>' |
340 | ); |
341 | ok( $x->_out(qq{=pod\n\nL<< Perl\nB<<< Error\nE<77>essages >>>|perldiag >>\n}), |
342 | '<Document><Para><L to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>' |
343 | ); |
344 | ok( $x->_out(qq{=pod\n\nL<< Perl\nB<<< Error\t E<77>essages >>>|perldiag >>\n}), |
345 | '<Document><Para><L to="perldiag" type="pod">Perl <B>Error Messages</B></L></Para></Document>' |
346 | ); |
347 | |
348 | |
349 | ok( $x->_out(qq{=pod\n\nL<< SWITCH B<<< E<115>tatements >>>|perlsyn/"Basic I<<<< BLOCKs >>>> and Switch StatementE<115>" >>\n}), |
350 | '<Document><Para><L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L></Para></Document>' |
351 | ); |
352 | ok( $x->_out(qq{=pod\n\nL<< SWITCH B<<< E<115>tatements >>>|perlsyn/Basic I<<<< BLOCKs >>>> and Switch StatementE<115> >>\n}), |
353 | '<Document><Para><L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L></Para></Document>' |
354 | ); |
355 | |
356 | |
357 | ok( $x->_out(qq{=pod\n\nL<<< the F<< various >> attributes|/"Member Data" >>>\n}), |
358 | '<Document><Para><L section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>' |
359 | ); |
360 | ok( $x->_out(qq{=pod\n\nL<<< the F<< various >> attributes|/Member Data >>>\n}), |
361 | '<Document><Para><L section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>' |
362 | ); |
363 | ok( $x->_out(qq{=pod\n\nL<<< the F<< various >> attributes|"Member Data" >>>\n}), |
364 | '<Document><Para><L section="Member Data" type="pod">the <F>various</F> attributes</L></Para></Document>' |
365 | ); |
366 | |
367 | ########################################################################### |
368 | |
369 | print "#\n# Now some very complex L<text|stuff> tests with variant syntax and text around it...\n"; |
370 | |
371 | |
372 | ok( $x->_out(qq{=pod\n\nI like L<< Perl B<<< Error E<77>essages >>>|perldiag >>.\n}), |
373 | '<Document><Para>I like <L to="perldiag" type="pod">Perl <B>Error Messages</B></L>.</Para></Document>' |
374 | ); |
375 | ok( $x->_out(qq{=pod\n\nI like L<< Perl\nB<<< Error\nE<77>essages >>>|perldiag >>.\n}), |
376 | '<Document><Para>I like <L to="perldiag" type="pod">Perl <B>Error Messages</B></L>.</Para></Document>' |
377 | ); |
378 | ok( $x->_out(qq{=pod\n\nI like L<< Perl\nB<<< Error\t E<77>essages >>>|perldiag >>.\n}), |
379 | '<Document><Para>I like <L to="perldiag" type="pod">Perl <B>Error Messages</B></L>.</Para></Document>' |
380 | ); |
381 | |
382 | |
383 | ok( $x->_out(qq{=pod\n\nI like L<< SWITCH B<<< E<115>tatements >>>|perlsyn/"Basic I<<<< BLOCKs >>>> and Switch StatementE<115>" >>.\n}), |
384 | '<Document><Para>I like <L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L>.</Para></Document>' |
385 | ); |
386 | ok( $x->_out(qq{=pod\n\nI like L<< SWITCH B<<< E<115>tatements >>>|perlsyn/Basic I<<<< BLOCKs >>>> and Switch StatementE<115> >>.\n}), |
387 | '<Document><Para>I like <L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod">SWITCH <B>statements</B></L>.</Para></Document>' |
388 | ); |
389 | |
390 | |
391 | ok( $x->_out(qq{=pod\n\nI like L<<< the F<< various >> attributes|/"Member Data" >>>.\n}), |
392 | '<Document><Para>I like <L section="Member Data" type="pod">the <F>various</F> attributes</L>.</Para></Document>' |
393 | ); |
394 | ok( $x->_out(qq{=pod\n\nI like L<<< the F<< various >> attributes|/Member Data >>>.\n}), |
395 | '<Document><Para>I like <L section="Member Data" type="pod">the <F>various</F> attributes</L>.</Para></Document>' |
396 | ); |
397 | ok( $x->_out(qq{=pod\n\nI like L<<< the F<< various >> attributes|"Member Data" >>>.\n}), |
398 | '<Document><Para>I like <L section="Member Data" type="pod">the <F>various</F> attributes</L>.</Para></Document>' |
399 | ); |
400 | |
69473a20 |
401 | ok( $x->_out(qq{=pod\n\nI like L<<< B<text>s|http://text.com >>>.\n}), |
402 | '<Document><Para>I like <L to="http://text.com" type="url"><B>text</B>s</L>.</Para></Document>' |
403 | ); |
404 | ok( $x->_out(qq{=pod\n\nI like L<<< text|https://text.com/1/2 >>>.\n}), |
405 | '<Document><Para>I like <L to="https://text.com/1/2" type="url">text</L>.</Para></Document>' |
406 | ); |
407 | ok( $x->_out(qq{=pod\n\nI like L<<< I<text>|http://text.com >>>.\n}), |
408 | '<Document><Para>I like <L to="http://text.com" type="url"><I>text</I></L>.</Para></Document>' |
409 | ); |
410 | ok( $x->_out(qq{=pod\n\nI like L<<< C<text>|http://text.com >>>.\n}), |
411 | '<Document><Para>I like <L to="http://text.com" type="url"><C>text</C></L>.</Para></Document>' |
412 | ); |
413 | ok( $x->_out(qq{=pod\n\nI like L<<< I<tI<eI<xI<t>>>>|mailto:earlE<64>text.com >>>.\n}), |
414 | '<Document><Para>I like <L to="mailto:earl@text.com" type="url"><I>t<I>e<I>x<I>t</I></I></I></I></L>.</Para></Document>' |
415 | ); |
416 | ok( $x->_out(qq{=pod\n\nI like L<<< textZ<>|http://text.com >>>.\n}), |
417 | '<Document><Para>I like <L to="http://text.com" type="url">text</L>.</Para></Document>' |
418 | ); |
419 | |
420 | |
421 | |
351625bd |
422 | |
423 | # |
424 | # TODO: S testing. |
425 | # |
426 | |
427 | ########################################################################### |
428 | |
429 | print "# Wrapping up... one for the road...\n"; |
430 | ok 1; |
431 | print "# --- Done with ", __FILE__, " --- \n"; |
432 | |
433 | |