X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=dev%2Farm%2Flibpod-simple-perl%2Flibpod-simple-perl-3.07%2Ft%2Fxhtml05.t;fp=dev%2Farm%2Flibpod-simple-perl%2Flibpod-simple-perl-3.07%2Ft%2Fxhtml05.t;h=4e2738ee7fffaf12a6c2fae04b9dda1ffde6efa6;hb=f477fa73365d491991707e7ed9217b48d6994551;hp=0000000000000000000000000000000000000000;hpb=da95c414033799c3a62606f299c3c00b5c77ca11;p=dh-make-perl diff --git a/dev/arm/libpod-simple-perl/libpod-simple-perl-3.07/t/xhtml05.t b/dev/arm/libpod-simple-perl/libpod-simple-perl-3.07/t/xhtml05.t new file mode 100644 index 0000000..4e2738e --- /dev/null +++ b/dev/arm/libpod-simple-perl/libpod-simple-perl-3.07/t/xhtml05.t @@ -0,0 +1,67 @@ +#!/usr/bin/perl -w + +# t/xhtml05.t - check block output from Pod::Simple::XHTML + +BEGIN { + chdir 't' if -d 't'; +} + +use strict; +use lib '../lib'; +use Test::More tests => 6; + +use_ok('Pod::Simple::XHTML') or exit; + +my $parser = Pod::Simple::XHTML->new (); +isa_ok ($parser, 'Pod::Simple::XHTML'); + +my $results; +initialize($parser, $results); +$parser->accept_targets_as_text( 'comment' ); +$parser->parse_string_document(<<'EOPOD'); +=for comment +This is an ordinary for block. + +EOPOD + +is($results, <<'EOHTML', "a for block"); +
+ +

This is an ordinary for block.

+ +
+ +EOHTML + +foreach my $target qw(note tip warning) { + initialize($parser, $results); + $parser->accept_targets_as_text( $target ); + $parser->parse_string_document(<<"EOPOD"); +=begin $target + +This is a $target. + +=end $target +EOPOD + + is($results, <<"EOHTML", "allow $target blocks"); +
+ +

This is a $target.

+ +
+ +EOHTML + +} + +###################################### + +sub initialize { + $_[0] = Pod::Simple::XHTML->new (); + $_[0]->html_header(""); + $_[0]->html_footer(""); + $_[0]->output_string( \$results ); # Send the resulting output to a string + $_[1] = ''; + return; +}