1b39c5158SmillertBEGIN { 2b39c5158Smillert if($ENV{PERL_CORE}) { 3b39c5158Smillert chdir 't'; 4b39c5158Smillert @INC = '../lib'; 5b39c5158Smillert } 6b39c5158Smillert} 7b39c5158Smillert 8b39c5158Smillertuse strict; 9*256a93a4Safresh1use warnings; 10b39c5158Smillertuse Test; 11b39c5158SmillertBEGIN { plan tests => 6 }; 12b39c5158Smillert 13*256a93a4Safresh1BEGIN { 14*256a93a4Safresh1 require FindBin; 15*256a93a4Safresh1 unshift @INC, $FindBin::Bin . '/lib'; 16*256a93a4Safresh1 require helpers; 17*256a93a4Safresh1 helpers->import; 18*256a93a4Safresh1} 19b39c5158Smillert#my $d; 20b39c5158Smillert#use Pod::Simple::Debug (3); 21b39c5158Smillert 22b39c5158Smillertok 1; 23b39c5158Smillert 24b39c5158Smillertuse Pod::Simple::DumpAsXML; 25b39c5158Smillertuse Pod::Simple::XMLOutStream; 26b39c5158Smillertprint "# Pod::Simple version $Pod::Simple::VERSION\n"; 27b39c5158Smillert 28b39c5158Smillertmy $x = 'Pod::Simple::XMLOutStream'; 29b39c5158Smillert 30b39c5158Smillertprint "##### Tests for '=item * Foo' tolerance via class $x\n"; 31b39c5158Smillert 32b39c5158Smillert$Pod::Simple::XMLOutStream::ATTR_PAD = ' '; 33b39c5158Smillert$Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output 34b39c5158Smillert 35b39c5158Smillert 36b39c5158Smillertprint "#\n# Tests for simple =item *'s\n"; 37b39c5158Smillertok( $x->_out("\n=over\n\n=item * Stuff\n\n=item * Bar I<baz>!\n\n=back\n\n"), 38b39c5158Smillert '<Document><over-bullet indent="4"><item-bullet>Stuff</item-bullet><item-bullet>Bar <I>baz</I>!</item-bullet></over-bullet></Document>' 39b39c5158Smillert); 40b39c5158Smillertok( $x->_out("\n=over\n\n=item * Stuff\n\n=cut\n\nStuff\n\n=item *\n\nBar I<baz>!\n\n=back\n\n"), 41b39c5158Smillert '<Document><over-bullet indent="4"><item-bullet>Stuff</item-bullet><item-bullet>Bar <I>baz</I>!</item-bullet></over-bullet></Document>' 42b39c5158Smillert); 43b39c5158Smillertok( $x->_out("\n=over 10\n\n=item * Stuff\n\n=cut\n\nStuff\n\n=item *\n\nBar I<baz>!\n\n=back\n\n"), 44b39c5158Smillert '<Document><over-bullet indent="10"><item-bullet>Stuff</item-bullet><item-bullet>Bar <I>baz</I>!</item-bullet></over-bullet></Document>' 45b39c5158Smillert); 46b39c5158Smillertok( $x->_out("\n=over\n\n=item * Stuff I<things\num> hoo!\n=cut\nStuff\n\n=item *\n\nBar I<baz>!\n\n=back"), 47b39c5158Smillert '<Document><over-bullet indent="4"><item-bullet>Stuff <I>things um</I> hoo!</item-bullet><item-bullet>Bar <I>baz</I>!</item-bullet></over-bullet></Document>' 48b39c5158Smillert); 49b39c5158Smillert 50b39c5158Smillert 51b39c5158Smillert 52b39c5158Smillert 53b39c5158Smillertprint "# Wrapping up... one for the road...\n"; 54b39c5158Smillertok 1; 55b39c5158Smillertprint "# --- Done with ", __FILE__, " --- \n"; 56b39c5158Smillert 57b39c5158Smillert 58