3 # overstrike.t -- Additional specialized tests for Pod::Text::Overstrike.
5 # Copyright 2002, 2004, 2006, 2009 by Russ Allbery <rra@stanford.edu>
7 # This program is free software; you may redistribute it and/or modify it
8 # under the same terms as Perl itself.
12 if ($ENV{PERL_CORE}) {
15 unshift (@INC, '../blib/lib');
21 use Test::More tests => 4;
22 BEGIN { use_ok ('Pod::Text::Overstrike') }
24 my $parser = Pod::Text::Overstrike->new;
25 isa_ok ($parser, 'Pod::Text::Overstrike', 'Parser module');
28 next until $_ eq "###\n";
29 open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
31 last if $_ eq "###\n";
35 open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
36 $parser->parse_from_file ('tmp.pod', \*OUT);
38 open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
45 1 while unlink ('tmp.pod', 'out.tmp');
48 last if $_ eq "###\n";
51 is ($output, $expected, "Output correct for test $n");
55 # Below the marker are bits of POD and corresponding expected output. This is
56 # used to test specific features or problems with Pod::Text::Termcap. The
57 # input and output are separated by lines containing only ###.
64 B<I<Do>> I<B<not>> B<I<include>> B<I<formatting codes when>> B<I<wrapping>>.
66 W
\bWR
\bRA
\bAP
\bPP
\bPI
\bIN
\bNG
\bG
67 D
\bDo
\bo _
\bn_
\bo_
\bt i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be f
\bfo
\bor
\brm
\bma
\bat
\btt
\bti
\bin
\bng
\bg
\b c
\bco
\bod
\bde
\bes
\bs
\b w
\bwh
\bhe
\ben
\bn w
\bwr
\bra
\bap
\bpp
\bpi
\bin
\bng
\bg.
94 T
\bTA
\bAG
\bG
\b W
\bWI
\bID
\bDT
\bTH
\bH
97 1
\b12
\b23
\b34
\b45
\b56
\b67
\b78
\b8 B