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