diff options
Diffstat (limited to 'cpan/Pod-Simple/t/xhtml15.t')
-rw-r--r-- | cpan/Pod-Simple/t/xhtml15.t | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cpan/Pod-Simple/t/xhtml15.t b/cpan/Pod-Simple/t/xhtml15.t new file mode 100644 index 0000000000..2f1bc5e4c2 --- /dev/null +++ b/cpan/Pod-Simple/t/xhtml15.t @@ -0,0 +1,37 @@ +#!/usr/bin/perl -w + +# t/xhtml15.t - test compatibility between Pod::Simple::XHTML and +# Pod::Simple::HtmlBatch + +use strict; +use warnings; +use lib 'lib'; +use Test::More; + +use_ok('Pod::Simple::XHTML') or exit; + +my ($parser, $results); + +initialize(); +my $style = 'http://amazingpants.com/style.css'; +$parser->html_css($style); +$parser->parse_string_document( '=head1 Foo' ); +like $results, qr/ href="$style" /, 'CSS is correct when link is passed in'; + +initialize(); +my $link = qq{<link rel="stylesheet" href="$style" type="text/css">}; +$parser->html_css($link); +$parser->parse_string_document( '=head1 Foo' ); +like $results, qr/ href="$style" /, 'CSS is correct when <link> is passed in'; + +#note('These methods are called when XHTML is used by HtmlBatch'); +can_ok $parser, qw/batch_mode_page_object_init html_header_after_title/; + +done_testing; + +sub initialize { + $parser = Pod::Simple::XHTML->new; + $parser->index(1); + $parser->output_string( \$results ); + $results = ''; +} |