Commit | Line | Data |
---|---|---|
433cf6b4 JV |
1 | # Testing the =item directive\r |
2 | BEGIN {\r | |
3 | if($ENV{PERL_CORE}) {\r | |
4 | chdir 't';\r | |
5 | @INC = '../lib';\r | |
6 | }\r | |
7 | }\r | |
8 | \r | |
9 | use strict;\r | |
10 | use Test;\r | |
11 | BEGIN { plan tests => 4 };\r | |
12 | \r | |
13 | my $d;\r | |
14 | #use Pod::Simple::Debug (\$d,0);\r | |
15 | \r | |
16 | ok 1;\r | |
17 | \r | |
18 | use Pod::Simple::DumpAsXML;\r | |
19 | use Pod::Simple::XMLOutStream;\r | |
20 | print "# Pod::Simple version $Pod::Simple::VERSION\n";\r | |
21 | sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) }\r | |
22 | \r | |
23 | my $x = 'Pod::Simple::XMLOutStream';\r | |
24 | \r | |
25 | print "##### Tests for =item directives via class $x\n";\r | |
26 | \r | |
27 | $Pod::Simple::XMLOutStream::ATTR_PAD = ' ';\r | |
28 | $Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output\r | |
29 | \r | |
30 | \r | |
31 | print "#\n# Tests for =item [number] that are icky...\n";\r | |
32 | ok( $x->_out("\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"),\r | |
33 | '<Document><over-text indent="4"><item-text>5</item-text><Para>Stuff</Para><item-text>4</item-text><Para>Quux</Para></over-text></Document>'\r | |
34 | );\r | |
35 | \r | |
36 | ok( $x->_out("\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"),\r | |
37 | '<Document><over-text indent="4"><item-text>5.</item-text><Para>Stuff</Para><item-text>4.</item-text><Para>Quux</Para></over-text></Document>'\r | |
38 | );\r | |
39 | \r | |
40 | \r | |
41 | print "# Wrapping up... one for the road...\n";\r | |
42 | ok 1;\r | |
43 | print "# --- Done with ", __FILE__, " --- \n";\r | |
44 | \r |