10 BEGIN { plan tests => 8 };
13 #use Pod::Simple::Debug (\$d, 0);
17 use Pod::Simple::XMLOutStream;
18 use Pod::Simple::DumpAsXML;
19 use Pod::Simple::DumpAsText;
22 'Pod::Simple::XMLOutStream'
23 => '<Document><head1>I LIKE PIE</head1></Document>',
25 'Pod::Simple::DumpAsXML'
26 => "<Document>\n <head1>\n I LIKE PIE\n </head1>\n</Document>\n",
28 'Pod::Simple::DumpAsText'
29 => "++Document\n ++head1\n * \"I LIKE PIE\"\n --head1\n--Document\n",
34 # Might as well test all the classes...
36 my($x => $expected) = splice(@from, 0,2);
38 print "#Testing via class $x, version ", $x->VERSION(), "\n";
41 ok scalar($got = $x->_out(
44 $_[0]->code_handler(sub { $more .= $_[1] . ":" . $_[0] . "\n" } );
45 $_[0]->cut_handler( sub { $more .= "~" . $_[1] . ":" . $_[0]. "\n" } );
48 "\t# This is handy...",
53 "runtests(sort glob 't/*.t');",
57 => scalar($exp = $expected);
59 unless($got eq $exp) {
60 print '# Got vs exp:\n# ', Pod::Simple::BlackBox::pretty($got),
61 "\n# ",Pod::Simple::BlackBox::pretty($exp),"\n";
64 ok scalar($got = $more), scalar($exp = join "\n" =>
66 "2:\t# This is handy...",
68 "6:use Test::Harness;",
69 "7:runtests(sort glob 't/*.t');",
73 unless($got eq $exp) {
74 print '# Got vs exp:\n# ', Pod::Simple::BlackBox::pretty($got),
75 "\n# ",Pod::Simple::BlackBox::pretty($exp),"\n";
80 print "# Wrapping up... one for the road...\n";
82 print "# --- Done with ", __FILE__, " --- \n";