#!/usr/bin/perl -w # t/html.t - check output from Pod::PseudoPod::HTML BEGIN { chdir 't' if -d 't'; } use strict; use lib '../lib'; use Test::More tests => 31; use_ok('Pod::PseudoPod::HTML') or exit; my $parser = Pod::PseudoPod::HTML->new (); isa_ok ($parser, 'Pod::PseudoPod::HTML'); my $results; initialize($parser, $results); $parser->parse_string_document( "=head0 Narf!" ); is($results, "
Gee, Brain, what do you want to do tonight?
EOHTML initialize($parser, $results); $parser->parse_string_document(<<'EOPOD'); =pod B: Now, Pinky, if by any chance you are captured during this mission, remember you are Gunther Heindriksen from Appenzell. You moved to Grindelwald to drive the cog train to Murren. Can you repeat that? P: Mmmm, no, Brain, don't think I can. EOPOD my $html = 'B: Now, Pinky, if by any chance you are captured during this mission, ' . 'remember you are Gunther Heindriksen from Appenzell. You moved to ' . "Grindelwald to drive the cog train to Murren. Can you repeat that?
\n\n" . "P: Mmmm, no, Brain, don't think I can.
\n\n"; is($results, $html, "multiple paragraphs"); initialize($parser, $results); $parser->parse_string_document(<<'EOPOD'); =over =item * P: Gee, Brain, what do you want to do tonight? =item * B: The same thing we do every night, Pinky. Try to take over the world! =back EOPOD is($results, <<'EOHTML', "simple bulleted list");Gee, Brain, what do you want to do tonight?
The same thing we do every night, Pinky. Try to take over the world!
1 + 1 = 2;
2 + 2 = 4;
EOHTML
initialize($parser, $results);
$parser->parse_string_document(<<'EOPOD');
=pod
A plain paragraph with a CA plain paragraph with a functionname.
A plain paragraph with a (footnote: footnote entry).
EOHTML initialize($parser, $results); $parser->add_body_tags(1); $parser->parse_string_document(<<'EOPOD'); =pod A plain paragraph with body tags turned on. EOPOD is($results, <<"EOHTML", "adding html body tags");A plain paragraph with body tags turned on.
EOHTML initialize($parser, $results); $parser->add_body_tags(1); $parser->add_css_tags(1); $parser->parse_string_document(<<'EOPOD'); =pod A plain paragraph with body tags and css tags turned on. EOPOD is($results, <<"EOHTML", "adding html body tags and css tags");A plain paragraph with body tags and css tags turned on.
EOHTML initialize($parser, $results); $parser->add_css_tags(1); $parser->parse_string_document(<<'EOPOD'); =pod A plain paragraph with aNA plain paragraph with a (footnote: ' . "footnote entry) and css tags.
\n\n"; is($results, $html, "css footnote entity in a paragraph"); initialize($parser, $results); $parser->add_css_tags(1); $parser->parse_string_document(<<'EOPOD'); =pod A plain paragraph with a UA plain paragraph with a ' . "http://test.url.com/stuff/and/junk.txt.
\n\n"; is($results, $html, "URL entity in a paragraph"); initialize($parser, $results); $parser->parse_string_document(<<'EOPOD'); =pod A plain paragraph with a ZA plain paragraph with a .
EOHTML initialize($parser, $results); $parser->parse_string_document(<<'EOPOD'); =pod A plain paragraph with a AA plain paragraph with a link.
EOHTML initialize($parser, $results); $parser->parse_string_document(<<'EOPOD'); =pod A plain paragraph with a GA plain paragraph with a superscript.
EOHTML initialize($parser, $results); $parser->parse_string_document(<<'EOPOD'); =pod A plain paragraph with a HA plain paragraph with a subscript.
EOHTML initialize($parser, $results); $parser->parse_string_document(<<'EOPOD'); =pod A plain paragraph with BA plain paragraph with bold text.
EOHTML initialize($parser, $results); $parser->parse_string_document(<<'EOPOD'); =pod A plain paragraph with IA plain paragraph with italic text.
EOHTML initialize($parser, $results); $parser->parse_string_document(<<'EOPOD'); =pod A plain paragraph with RA plain paragraph with replaceable text.
EOHTML initialize($parser, $results); $parser->parse_string_document(<<'EOPOD'); =pod A plain paragraph with a FA plain paragraph with a filename.
EOHTML initialize($parser, $results); $parser->parse_string_document(<<'EOPOD'); =pod # this header is very important & don't you forget it my $text = "File is: " .