This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: savepv() of getenv()
[perl5.git] / cpan / Pod-Simple / t / xhtml15.t
CommitLineData
60527824
FR
1#!/usr/bin/perl -w
2
3# t/xhtml15.t - test compatibility between Pod::Simple::XHTML and
4# Pod::Simple::HtmlBatch
5
6use strict;
7use warnings;
c2111e44 8use Test::More tests => 4;
60527824
FR
9
10use_ok('Pod::Simple::XHTML') or exit;
11
12my ($parser, $results);
13
14initialize();
15my $style = 'http://amazingpants.com/style.css';
16$parser->html_css($style);
17$parser->parse_string_document( '=head1 Foo' );
18like $results, qr/ href="$style" /, 'CSS is correct when link is passed in';
19
20initialize();
21my $link = qq{<link rel="stylesheet" href="$style" type="text/css">};
22$parser->html_css($link);
23$parser->parse_string_document( '=head1 Foo' );
24like $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');
27can_ok $parser, qw/batch_mode_page_object_init html_header_after_title/;
28
60527824
FR
29sub initialize {
30 $parser = Pod::Simple::XHTML->new;
31 $parser->index(1);
32 $parser->output_string( \$results );
33 $results = '';
34}