Upgrade to Pod-Simple-3.05.
[p5sagit/p5-mst-13.2.git] / lib / Pod / Simple / t / html03.t
CommitLineData
351625bd 1# t/html-para.t
2
3BEGIN {
4 if($ENV{PERL_CORE}) {
5 chdir 't';
6 @INC = '../lib';
7 }
8}
9
10use strict;
11use Test;
12BEGIN { plan tests => 7 };
13
14#use Pod::Simple::Debug (10);
15
16use Pod::Simple::HTML;
17
18sub x ($) { Pod::Simple::HTML->_out(
19 #sub{ $_[0]->bare_output(1) },
20 "=pod\n\n$_[0]",
21) }
22
23
24# make sure empty file => empty output
25
26ok 1;
27ok( x(''),'', "Contentlessness" );
28ok( x(qq{=pod\n\nThis is a paragraph}) =~ m{<title></title>}i );
29ok( x(qq{This is a paragraph}) =~ m{<title></title>}i );
30ok( x(qq{=head1 Prok\n\nThis is a paragraph}) =~ m{<title>Prok</title>}i );
31ok( x(qq{=head1 NAME\n\nProk -- stuff\n\nThis}), q{/<title>Prok</title>/} );
32
33print "# And one for the road...\n";
34ok 1;
35