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