1 # Testing the =item directive
11 BEGIN { plan tests => 4 };
14 #use Pod::Simple::Debug (\$d,0);
18 use Pod::Simple::DumpAsXML;
19 use Pod::Simple::XMLOutStream;
20 print "# Pod::Simple version $Pod::Simple::VERSION\n";
21 sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) }
23 my $x = 'Pod::Simple::XMLOutStream';
25 print "##### Tests for =item directives via class $x\n";
27 $Pod::Simple::XMLOutStream::ATTR_PAD = ' ';
28 $Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output
31 print "#\n# Tests for =item [number] that are icky...\n";
32 ok( $x->_out(sub { $_[0]->no_errata_section(1) },
33 "\n=over\n\n=item 5\n\nStuff\n\n=cut\n\nCrunk\nZorp\n\n=item 4\n\nQuux\n\n=back\n\n"),
34 '<Document><over-text indent="4"><item-text>5</item-text><Para>Stuff</Para><item-text>4</item-text><Para>Quux</Para></over-text></Document>'
37 ok( $x->_out(sub { $_[0]->no_errata_section(1) },
38 "\n=over\n\n=item 5.\n\nStuff\n\n=cut\n\nCrunk\nZorp\n\n=item 4.\n\nQuux\n\n=back\n\n"),
39 '<Document><over-text indent="4"><item-text>5.</item-text><Para>Stuff</Para><item-text>4.</item-text><Para>Quux</Para></over-text></Document>'
43 print "# Wrapping up... one for the road...\n";
45 print "# --- Done with ", __FILE__, " --- \n";