3 # overstrike.t -- Additional specialized tests for Pod::Text::Overstrike.
5 # Copyright 2002, 2004, 2006, 2009, 2012, 2013
6 # Russ Allbery <rra@cpan.org>
8 # This program is free software; you may redistribute it and/or modify it
9 # under the same terms as Perl itself.
13 if ($ENV{PERL_CORE}) {
16 unshift (@INC, '../blib/lib');
22 use Test::More tests => 4;
23 BEGIN { use_ok ('Pod::Text::Overstrike') }
25 my $parser = Pod::Text::Overstrike->new;
26 isa_ok ($parser, 'Pod::Text::Overstrike', 'Parser module');
29 next until $_ eq "###\n";
30 open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
32 last if $_ eq "###\n";
36 open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
37 $parser->parse_from_file ("tmp$$.pod", \*OUT);
39 open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
46 1 while unlink ("tmp$$.pod", "out$$.tmp");
49 last if $_ eq "###\n";
52 is ($output, $expected, "Output correct for test $n");
56 # Below the marker are bits of POD and corresponding expected output. This is
57 # used to test specific features or problems with Pod::Text::Termcap. The
58 # input and output are separated by lines containing only ###.
65 B<I<Do>> I<B<not>> B<I<include>> B<I<formatting codes when>> B<I<wrapping>>.
67 W
\bWR
\bRA
\bAP
\bPP
\bPI
\bIN
\bNG
\bG
68 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.
95 T
\bTA
\bAG
\bG
\b W
\bWI
\bID
\bDT
\bTH
\bH
98 1
\b12
\b23
\b34
\b45
\b56
\b67
\b78
\b8 B