3 # t/output.t - Check output_string.
11 use Test::More tests => 36;
12 #use Test::More 'no_plan';
15 for my $format (qw(XHTML HTML Text RTF)) {
16 my $class = "Pod::Simple::$format";
17 use_ok $class or next;
18 ok my $parser = $class->new, "Construct $format parser";
20 # Try parse_string_document().
22 ok $parser->output_string(\$output), "Set $format output string";
23 ok $parser->parse_string_document( "=head1 Poit!" ),
24 "Parse to $format via parse_string_document()";
25 like $output, qr{Poit!},
26 "Should have $format output from parse_string_document()";
29 ok $parser = $class->new, "Construct another $format parser";
31 ok $parser->output_string(\$output), "Set $format output string again";
32 ok $parser->parse_file(File::Spec->catfile(qw(testlib1 zikzik.pod))),
33 "Parse to $format via parse_file()";
34 like $output, qr{This is just a test file},
35 "Should have $format output from parse_file";