Commit | Line | Data |
351625bd |
1 | # t/html-para.t |
2 | |
3 | BEGIN { |
4 | if($ENV{PERL_CORE}) { |
5 | chdir 't'; |
6 | @INC = '../lib'; |
7 | } |
8 | } |
9 | |
10 | use strict; |
11 | use Test; |
12 | BEGIN { plan tests => 7 }; |
13 | |
14 | #use Pod::Simple::Debug (10); |
15 | |
16 | use Pod::Simple::HTML; |
17 | |
18 | sub 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 | |
26 | ok 1; |
27 | ok( x(''),'', "Contentlessness" ); |
28 | ok( x(qq{=pod\n\nThis is a paragraph}) =~ m{<title></title>}i ); |
29 | ok( x(qq{This is a paragraph}) =~ m{<title></title>}i ); |
30 | ok( x(qq{=head1 Prok\n\nThis is a paragraph}) =~ m{<title>Prok</title>}i ); |
31 | ok( x(qq{=head1 NAME\n\nProk -- stuff\n\nThis}), q{/<title>Prok</title>/} ); |
32 | |
33 | print "# And one for the road...\n"; |
34 | ok 1; |
35 | |