Commit | Line | Data |
---|---|---|
60527824 FR |
1 | #!/usr/bin/perl -w |
2 | ||
3 | # t/xhtml15.t - test compatibility between Pod::Simple::XHTML and | |
4 | # Pod::Simple::HtmlBatch | |
5 | ||
6 | use strict; | |
7 | use warnings; | |
c2111e44 | 8 | use Test::More tests => 4; |
60527824 FR |
9 | |
10 | use_ok('Pod::Simple::XHTML') or exit; | |
11 | ||
12 | my ($parser, $results); | |
13 | ||
14 | initialize(); | |
15 | my $style = 'http://amazingpants.com/style.css'; | |
16 | $parser->html_css($style); | |
17 | $parser->parse_string_document( '=head1 Foo' ); | |
18 | like $results, qr/ href="$style" /, 'CSS is correct when link is passed in'; | |
19 | ||
20 | initialize(); | |
21 | my $link = qq{<link rel="stylesheet" href="$style" type="text/css">}; | |
22 | $parser->html_css($link); | |
23 | $parser->parse_string_document( '=head1 Foo' ); | |
24 | like $results, qr/ href="$style" /, 'CSS is correct when <link> is passed in'; | |
25 | ||
26 | #note('These methods are called when XHTML is used by HtmlBatch'); | |
27 | can_ok $parser, qw/batch_mode_page_object_init html_header_after_title/; | |
28 | ||
60527824 FR |
29 | sub initialize { |
30 | $parser = Pod::Simple::XHTML->new; | |
31 | $parser->index(1); | |
32 | $parser->output_string( \$results ); | |
33 | $results = ''; | |
34 | } |