3 # t/xhtml05.t - check block output from Pod::Simple::XHTML
11 use Test::More tests => 6;
13 use_ok('Pod::Simple::XHTML') or exit;
15 my $parser = Pod::Simple::XHTML->new ();
16 isa_ok ($parser, 'Pod::Simple::XHTML');
19 initialize($parser, $results);
20 $parser->accept_targets_as_text( 'comment' );
21 $parser->parse_string_document(<<'EOPOD');
23 This is an ordinary for block.
27 is($results, <<'EOHTML', "a for block");
30 <p>This is an ordinary for block.</p>
36 foreach my $target qw(note tip warning) {
37 initialize($parser, $results);
38 $parser->accept_targets_as_text( $target );
39 $parser->parse_string_document(<<"EOPOD");
47 is($results, <<"EOHTML", "allow $target blocks");
50 <p>This is a $target.</p>
58 ######################################
61 $_[0] = Pod::Simple::XHTML->new ();
62 $_[0]->html_header("");
63 $_[0]->html_footer("");
64 $_[0]->output_string( \$results ); # Send the resulting output to a string