X-Git-Url: http://git.maemo.org/git/?p=dh-make-perl;a=blobdiff_plain;f=dev%2Fi386%2Flibpod-simple-perl%2Flibpod-simple-perl-3.07%2Ft%2Ffcodes.t;fp=dev%2Fi386%2Flibpod-simple-perl%2Flibpod-simple-perl-3.07%2Ft%2Ffcodes.t;h=02e2a27ee1bd1beced5e5a9f385567329cc211a4;hp=0000000000000000000000000000000000000000;hb=8977e561d8a9eae6959218b0306c9df2056a38a9;hpb=df794b845212301ea0d267c919232538bfef356a diff --git a/dev/i386/libpod-simple-perl/libpod-simple-perl-3.07/t/fcodes.t b/dev/i386/libpod-simple-perl/libpod-simple-perl-3.07/t/fcodes.t new file mode 100644 index 0000000..02e2a27 --- /dev/null +++ b/dev/i386/libpod-simple-perl/libpod-simple-perl-3.07/t/fcodes.t @@ -0,0 +1,112 @@ +BEGIN { + if($ENV{PERL_CORE}) { + chdir 't'; + @INC = '../lib'; + } +} + +use strict; +use Test; +BEGIN { plan tests => 18 }; + +#use Pod::Simple::Debug (5); + +ok 1; + +use Pod::Simple::DumpAsXML; +use Pod::Simple::XMLOutStream; +print "# Pod::Simple version $Pod::Simple::VERSION\n"; +sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) } + +print "# With weird leading whitespace...\n"; +# With weird whitespace +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nI\n"), + 'foo' +); +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nB< foo>\n"), + ' foo' +); +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nB<\tfoo>\n"), + ' foo' +); +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nB<\nfoo>\n"), + ' foo' +); +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nB\n"), + 'foo' +); +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nB\n"), + 'foo ' +); +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nB\n"), + 'foo ' +); + + +print "#\n# Tests for wedges outside of formatting codes...\n"; +&ok( Pod::Simple::XMLOutStream->_out("=pod\n\nX < 3 and N > 19\n"), + Pod::Simple::XMLOutStream->_out("=pod\n\nX E 3 and N E 19\n") +); + + +print "# A complex test with internal whitespace...\n"; +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nIB< bar>CF< quux\t?>\n"), + 'foo barbaz quux ?' +); + + +print "# Without any nesting...\n"; +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nFCIBX\n"), + 'abcde' +); + +print "# Without any nesting, but with Z's...\n"; +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nZ<>FCIBX\n"), + 'abcde' +); + + +print "# With lots of nesting, and Z's...\n"; +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nZ<>Ffoo> I> B>baz>\n"), + 'foo bar thingbaz' +); + + + +print "#\n# *** Now testing different numbers of wedges ***\n"; +print "# Without any nesting...\n"; +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nF<< a >>C<<< b >>>I<<<< c >>>>B<< d >>X<< e >>\n"), + 'abcde' +); + +print "# Without any nesting, but with Z's, and odder whitespace...\n"; +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nF<< aZ<> >>C<<< Z<>b >>>I<<<< c >>>>B<< d \t >>X<<\ne >>\n"), + 'abcde' +); + +print "# With nesting and Z's, and odder whitespace...\n"; +ok( Pod::Simple::XMLOutStream->_out("=pod\n\nF<< aZ<> >>C<<< Z<>bZ<>B<< d \t >>X<<\ne >> >>>I<<<< c >>>>\n"), + 'abdec' +); + + +print "# Misc...\n"; +ok( Pod::Simple::XMLOutStream->_out( + "=pod\n\nI like I with B and Stuff and N < 3 and X<< things >> hoohah\n" +."And I a happy time>.\n" +."And B>>.>\n" +) => +"I like PIE with cream and Stuff and N < 3 and things hoohah " +."And pie is also a happy time. " +."And I like pie." +); + + + + + +print "# Wrapping up... one for the road...\n"; +ok 1; +print "# --- Done with ", __FILE__, " --- \n"; + +