Commit | Line | Data |
---|---|---|
351625bd SP |
1 | BEGIN { |
2 | if($ENV{PERL_CORE}) { | |
3 | chdir 't'; | |
4 | @INC = '../lib'; | |
5 | } | |
6 | } | |
7 | ||
8 | use strict; | |
9 | use Test; | |
10 | BEGIN { plan tests => 6 }; | |
11 | ||
12 | #my $d; | |
13 | #use Pod::Simple::Debug (3); | |
14 | ||
15 | ok 1; | |
16 | ||
17 | use Pod::Simple::DumpAsXML; | |
18 | use Pod::Simple::XMLOutStream; | |
19 | print "# Pod::Simple version $Pod::Simple::VERSION\n"; | |
20 | sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) } | |
21 | ||
22 | my $x = 'Pod::Simple::XMLOutStream'; | |
23 | ||
24 | print "##### Tests for '=item * Foo' tolerance via class $x\n"; | |
25 | ||
26 | $Pod::Simple::XMLOutStream::ATTR_PAD = ' '; | |
27 | $Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output | |
28 | ||
29 | ||
30 | print "#\n# Tests for simple =item *'s\n"; | |
31 | ok( $x->_out("\n=over\n\n=item * Stuff\n\n=item * Bar I<baz>!\n\n=back\n\n"), | |
32 | '<Document><over-bullet indent="4"><item-bullet>Stuff</item-bullet><item-bullet>Bar <I>baz</I>!</item-bullet></over-bullet></Document>' | |
33 | ); | |
34 | ok( $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"), | |
35 | '<Document><over-bullet indent="4"><item-bullet>Stuff</item-bullet><item-bullet>Bar <I>baz</I>!</item-bullet></over-bullet></Document>' | |
36 | ); | |
37 | ok( $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"), | |
38 | '<Document><over-bullet indent="10"><item-bullet>Stuff</item-bullet><item-bullet>Bar <I>baz</I>!</item-bullet></over-bullet></Document>' | |
39 | ); | |
40 | ok( $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"), | |
41 | '<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>' | |
42 | ); | |
43 | ||
44 | ||
45 | ||
46 | ||
47 | print "# Wrapping up... one for the road...\n"; | |
48 | ok 1; | |
49 | print "# --- Done with ", __FILE__, " --- \n"; | |
50 | ||
51 |