3 # text.t -- Additional specialized tests for Pod::Text.
5 # Copyright 2002, 2004, 2006, 2007 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');
17 unshift (@INC, '../blib/lib');
23 print "not ok 1\n" unless $loaded;
32 my $parser = Pod::Text->new or die "Cannot create parser\n";
35 next until $_ eq "###\n";
36 open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
38 last if $_ eq "###\n";
42 open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
43 $parser->parse_from_file ('tmp.pod', \*OUT);
45 open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
52 unlink ('tmp.pod', 'out.tmp');
55 last if $_ eq "###\n";
58 if ($output eq $expected) {
60 } elsif ($n == 4 && $Pod::Simple::VERSION < 3.07) {
61 print "ok $n # skip Pod::Simple S<> parsing bug\n";
64 print "Expected\n========\n$expected\nOutput\n======\n$output\n";
69 # Below the marker are bits of POD and corresponding expected text output.
70 # This is used to test specific features or problems with Pod::Text. The
71 # input and output are separated by lines containing only ###.
78 This C<.> should be quoted.
81 This "." should be quoted.
86 =head1 CE<lt>E<gt> WITH SPACES
88 What does C<< this. >> end up looking like?
91 What does "this." end up looking like?
96 =head1 Test of SE<lt>E<gt>
98 This is some S< > whitespace.
101 This is some whitespace.