Commit | Line | Data |
---|---|---|
9c7c0c6c | 1 | # Testing HTML text styles |
351625bd SP |
2 | |
3 | BEGIN { | |
4 | if($ENV{PERL_CORE}) { | |
5 | chdir 't'; | |
6 | @INC = '../lib'; | |
7 | } | |
8 | } | |
9 | ||
10 | #use Pod::Simple::Debug (10); | |
11 | ||
12 | use strict; | |
13 | use Test; | |
14 | BEGIN { plan tests => 7}; | |
15 | use Pod::Simple::HTML; | |
16 | ||
17 | sub x ($) { Pod::Simple::HTML->_out( | |
18 | sub{ $_[0]->bare_output(1) }, | |
19 | "=pod\n\n$_[0]", | |
20 | ) } | |
21 | ||
22 | ok 1; | |
23 | ||
24 | my @pairs = ( | |
25 | [ "I<italicized>" => qq{\n<p><i>italicized</i></p>\n} ], | |
26 | [ 'B<bolded>' => qq{\n<p><b>bolded</b></p>\n} ], | |
27 | [ 'C<code>' => qq{\n<p><code>code</code></p>\n} ], | |
28 | [ 'F</tmp/foo>' => qq{\n<p><em>/tmp/foo</em></p>\n} ], | |
29 | [ 'F</tmp/foo>' => qq{\n<p><em>/tmp/foo</em></p>\n} ], | |
30 | ); | |
31 | ||
32 | ||
33 | foreach( @pairs ) { | |
34 | print "# Testing pod source $$_[0] ...\n" unless $_->[0] =~ m/\n/; | |
35 | ok( x($_->[0]), $_->[1] ) | |
36 | } | |
37 | print "# And one for the road...\n"; | |
38 | ok 1; | |
39 | ||
40 |