X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=dev%2Fi386%2Flibpod-simple-perl%2Flibpod-simple-perl-3.07%2Ft%2Ffcodes_l.t;fp=dev%2Fi386%2Flibpod-simple-perl%2Flibpod-simple-perl-3.07%2Ft%2Ffcodes_l.t;h=17be5dbb483a658428aa4f3e322413ef448beb12;hb=8977e561d8a9eae6959218b0306c9df2056a38a9;hp=0000000000000000000000000000000000000000;hpb=df794b845212301ea0d267c919232538bfef356a;p=dh-make-perl diff --git a/dev/i386/libpod-simple-perl/libpod-simple-perl-3.07/t/fcodes_l.t b/dev/i386/libpod-simple-perl/libpod-simple-perl-3.07/t/fcodes_l.t new file mode 100644 index 0000000..17be5db --- /dev/null +++ b/dev/i386/libpod-simple-perl/libpod-simple-perl-3.07/t/fcodes_l.t @@ -0,0 +1,434 @@ +# fcodes L +BEGIN { + if($ENV{PERL_CORE}) { + chdir 't'; + @INC = '../lib'; + } +} + +use strict; +use Test; +BEGIN { plan tests => 99 }; + +#use Pod::Simple::Debug (10); + +ok 1; + +use Pod::Simple::DumpAsXML; +use Pod::Simple::XMLOutStream; +print "# Pod::Simple version $Pod::Simple::VERSION\n"; +sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) } +my $x = 'Pod::Simple::XMLOutStream'; + +print "##### Testing L codes via x class $x...\n"; + +$Pod::Simple::XMLOutStream::ATTR_PAD = ' '; +$Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output + +print "# Simple/moderate L tests...\n"; + +ok($x->_out(qq{=pod\n\nL\n}), + 'Net::Ping' +); + +ok($x->_out(qq{=pod\n\nL\n}), + 'crontab(5)' +); + +ok( $x->_out(qq{=pod\n\nL\n}), + '"Ping-pong" in Net::Ping' +); + +ok( $x->_out(qq{=pod\n\nL\n}), + '"Ping-pong" in Net::Ping' +); + +ok( $x->_out(qq{=pod\n\nL\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nL\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nL<"Object Methods">\n}), + '"Object Methods"' +); + + +print "# Complex L tests...\n"; +print "# Ents in the middle...\n"; + +ok($x->_out(qq{=pod\n\nL\n}), + 'Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLong>\n}), + '"Ping-pong" in Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLong">\n}), + '"Ping-pong" in Net::Ping' +); + +ok( $x->_out(qq{=pod\n\nLethods">\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nLethods>\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nL<"Object E<77>ethods">\n}), + '"Object Methods"' +); + + + +print "# Ents in the middle and at the start...\n"; + +ok($x->_out(qq{=pod\n\nLet::Ping>\n}), + 'Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLet::Ping/Ping-E<112>ong>\n}), + '"Ping-pong" in Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLet::Ping/"Ping-E<112>ong">\n}), + '"Ping-pong" in Net::Ping' +); + +ok( $x->_out(qq{=pod\n\nLbject E<77>ethods">\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nLbject E<77>ethods>\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nL<"E<79>bject E<77>ethods">\n}), + '"Object Methods"' +); + + +print "# Ents in the middle and at the start and at the end...\n"; + +ok($x->_out(qq{=pod\n\nLet::PinE<103>>\n}), + 'Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLet::PinE<103>/Ping-E<112>onE<103>>\n}), + '"Ping-pong" in Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLet::PinE<103>/"Ping-E<112>onE<103>">\n}), + '"Ping-pong" in Net::Ping' +); + +ok( $x->_out(qq{=pod\n\nLbject E<77>ethodE<115>">\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nLbject E<77>ethodE<115>>\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nL<"E<79>bject E<77>ethodE<115>">\n}), + '"Object Methods"' +); + + +print "# Even more complex L tests...\n"; + + +print "# Ents in the middle...\n"; + +ok($x->_out(qq{=pod\n\nL\n}), + 'Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLong>\n}), + '"Ping-pong" in Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLong">\n}), + '"Ping-pong" in Net::Ping' +); + +ok( $x->_out(qq{=pod\n\nLethods">\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nLethods>\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nL<"Object E<77>ethods">\n}), + '"Object Methods"' +); + + +########################################################################### + +print "# VERY complex L sequences...\n"; +print "# Ents in the middle and at the start...\n"; + + +ok($x->_out(qq{=pod\n\nL\n}), + 'Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLong>>\n}), + '"Ping-pong" in Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLong>">\n}), + '"Ping-pong" in Net::Ping' +); + +ok( $x->_out(qq{=pod\n\nL E<77>ethods">\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nL E<77>ethods>\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nL<"B E<77>ethods">\n}), + '"Object Methods"' +); + + + +print "# Ents in the middle and at the start...\n"; + +ok($x->_out(qq{=pod\n\nLet::Ping>\n}), + 'Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLet::Ping/Ping-Bong>>\n}), + '"Ping-pong" in Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLet::Ping/"Ping-Bong>">\n}), + '"Ping-pong" in Net::Ping' +); + +ok( $x->_out(qq{=pod\n\nLbject> E<77>ethods">\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nLbject> E<77>ethods>\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nL<"Bbject> E<77>ethods">\n}), + '"Object Methods"' +); + + +print "# Ents in the middle and at the start and at the end...\n"; + +ok($x->_out(qq{=pod\n\nLet::PinE<103>>\n}), + 'Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLet::PinE<103>/Ping-BonE<103>>>\n}), + '"Ping-pong" in Net::Ping' +); +ok( $x->_out(qq{=pod\n\nLet::PinE<103>/"Ping-BonE<103>>">\n}), + '"Ping-pong" in Net::Ping' +); + +ok( $x->_out(qq{=pod\n\nLbject> E<77>ethodE<115>">\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nLbject> E<77>ethodE<115>>\n}), + '"Object Methods"' +); +ok( $x->_out(qq{=pod\n\nL<"Bbject> E<77>ethodE<115>">\n}), + '"Object Methods"' +); + + +########################################################################### + +print "#\n# L tests...\n"; + +ok( $x->_out(qq{=pod\n\nL\n}), + 'news:comp.lang.perl.misc' +); +ok( $x->_out(qq{=pod\n\nL\n}), + 'http://www.perl.com' +); +ok( $x->_out(qq{=pod\n\nL\n}), + 'http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/' +); + +print "# L tests with entities...\n"; + +ok( $x->_out(qq{=pod\n\nLlang.perl.misc>\n}), + 'news:comp.lang.perl.misc' +); +ok( $x->_out(qq{=pod\n\nLperl.com>\n}), + 'http://www.perl.com' +); +ok( $x->_out(qq{=pod\n\nLperl.com/CPAN/authors/id/S/SB/SBURKE/>\n}), + 'http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/' +); +ok( $x->_out(qq{=pod\n\nLperl.com/CPAN/authors/id/S/SB/SBURKEE<47>>\n}), + 'http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/' +); + + +########################################################################### + + +print "# L tests...\n"; + +ok($x->_out(qq{=pod\n\nL\n}), + 'things' +); +ok($x->_out(qq{=pod\n\nL\n}), + 'things' +); +ok($x->_out(qq{=pod\n\nL\n}), + 'things' +); + +ok( $x->_out(qq{=pod\n\nL\n}), + 'Perl Error Messages' +); +ok( $x->_out(qq{=pod\n\nL\n}), + 'Perl Error Messages' +); +ok( $x->_out(qq{=pod\n\nL\n}), + 'Perl Error Messages' +); + + +ok( $x->_out(qq{=pod\n\nL\n}), + 'SWITCH statements' +); +ok( $x->_out(qq{=pod\n\nL\n}), + 'SWITCH statements' +); + + +ok( $x->_out(qq{=pod\n\nL\n}), + 'the various attributes' +); +ok( $x->_out(qq{=pod\n\nL\n}), + 'the various attributes' +); +ok( $x->_out(qq{=pod\n\nL\n}), + 'the various attributes' +); + + +print "#\n# Now some very complex L tests...\n"; + + +ok( $x->_out(qq{=pod\n\nLessages>|perldiag>\n}), + 'Perl Error Messages' +); +ok( $x->_out(qq{=pod\n\nLessages>|perldiag>\n}), + 'Perl Error Messages' +); +ok( $x->_out(qq{=pod\n\nLessages>|perldiag>\n}), + 'Perl Error Messages' +); + + +ok( $x->_out(qq{=pod\n\nLtatements>|perlsyn/"Basic I and Switch StatementE<115>">\n}), + 'SWITCH statements' +); +ok( $x->_out(qq{=pod\n\nLtatements>|perlsyn/Basic I and Switch StatementE<115>>\n}), + 'SWITCH statements' +); + + +ok( $x->_out(qq{=pod\n\nL attributes|/"Member Data">\n}), + 'the various attributes' +); +ok( $x->_out(qq{=pod\n\nL attributes|/Member Data>\n}), + 'the various attributes' +); +ok( $x->_out(qq{=pod\n\nL attributes|"Member Data">\n}), + 'the various attributes' +); + + +print "#\n# Now some very complex L tests with variant syntax...\n"; + + +ok( $x->_out(qq{=pod\n\nL<< Perl B<<< Error E<77>essages >>>|perldiag >>\n}), + 'Perl Error Messages' +); +ok( $x->_out(qq{=pod\n\nL<< Perl\nB<<< Error\nE<77>essages >>>|perldiag >>\n}), + 'Perl Error Messages' +); +ok( $x->_out(qq{=pod\n\nL<< Perl\nB<<< Error\t E<77>essages >>>|perldiag >>\n}), + 'Perl Error Messages' +); + + +ok( $x->_out(qq{=pod\n\nL<< SWITCH B<<< E<115>tatements >>>|perlsyn/"Basic I<<<< BLOCKs >>>> and Switch StatementE<115>" >>\n}), + 'SWITCH statements' +); +ok( $x->_out(qq{=pod\n\nL<< SWITCH B<<< E<115>tatements >>>|perlsyn/Basic I<<<< BLOCKs >>>> and Switch StatementE<115> >>\n}), + 'SWITCH statements' +); + + +ok( $x->_out(qq{=pod\n\nL<<< the F<< various >> attributes|/"Member Data" >>>\n}), + 'the various attributes' +); +ok( $x->_out(qq{=pod\n\nL<<< the F<< various >> attributes|/Member Data >>>\n}), + 'the various attributes' +); +ok( $x->_out(qq{=pod\n\nL<<< the F<< various >> attributes|"Member Data" >>>\n}), + 'the various attributes' +); + +########################################################################### + +print "#\n# Now some very complex L tests with variant syntax and text around it...\n"; + + +ok( $x->_out(qq{=pod\n\nI like L<< Perl B<<< Error E<77>essages >>>|perldiag >>.\n}), + 'I like Perl Error Messages.' +); +ok( $x->_out(qq{=pod\n\nI like L<< Perl\nB<<< Error\nE<77>essages >>>|perldiag >>.\n}), + 'I like Perl Error Messages.' +); +ok( $x->_out(qq{=pod\n\nI like L<< Perl\nB<<< Error\t E<77>essages >>>|perldiag >>.\n}), + 'I like Perl Error Messages.' +); + + +ok( $x->_out(qq{=pod\n\nI like L<< SWITCH B<<< E<115>tatements >>>|perlsyn/"Basic I<<<< BLOCKs >>>> and Switch StatementE<115>" >>.\n}), + 'I like SWITCH statements.' +); +ok( $x->_out(qq{=pod\n\nI like L<< SWITCH B<<< E<115>tatements >>>|perlsyn/Basic I<<<< BLOCKs >>>> and Switch StatementE<115> >>.\n}), + 'I like SWITCH statements.' +); + + +ok( $x->_out(qq{=pod\n\nI like L<<< the F<< various >> attributes|/"Member Data" >>>.\n}), + 'I like the various attributes.' +); +ok( $x->_out(qq{=pod\n\nI like L<<< the F<< various >> attributes|/Member Data >>>.\n}), + 'I like the various attributes.' +); +ok( $x->_out(qq{=pod\n\nI like L<<< the F<< various >> attributes|"Member Data" >>>.\n}), + 'I like the various attributes.' +); + +ok( $x->_out(qq{=pod\n\nI like L<<< Bs|http://text.com >>>.\n}), +'I like texts.' +); +ok( $x->_out(qq{=pod\n\nI like L<<< text|https://text.com/1/2 >>>.\n}), +'I like text.' +); +ok( $x->_out(qq{=pod\n\nI like L<<< I|http://text.com >>>.\n}), +'I like text.' +); +ok( $x->_out(qq{=pod\n\nI like L<<< C|http://text.com >>>.\n}), +'I like text.' +); +ok( $x->_out(qq{=pod\n\nI like L<<< I>>>|mailto:earlE<64>text.com >>>.\n}), +'I like text.' +); +ok( $x->_out(qq{=pod\n\nI like L<<< textZ<>|http://text.com >>>.\n}), +'I like text.' +); + + + + +# +# TODO: S testing. +# + +########################################################################### + +print "# Wrapping up... one for the road...\n"; +ok 1; +print "# --- Done with ", __FILE__, " --- \n"; + +