2 # $Id: text.t,v 1.6 2007-09-12 00:20:08 eagle Exp $
4 # text.t -- Additional specialized tests for Pod::Text.
6 # Copyright 2002, 2004, 2006, 2007 by Russ Allbery <rra@stanford.edu>
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');
18 unshift (@INC, '../blib/lib');
24 print "not ok 1\n" unless $loaded;
33 my $parser = Pod::Text->new or die "Cannot create parser\n";
36 next until $_ eq "###\n";
37 open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
39 last if $_ eq "###\n";
43 open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
44 $parser->parse_from_file ('tmp.pod', \*OUT);
46 open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
53 unlink ('tmp.pod', 'out.tmp');
56 last if $_ eq "###\n";
59 if ($output eq $expected) {
61 } elsif ($n == 4 && $Pod::Simple::VERSION < 3.06) {
62 print "ok $n # skip Pod::Simple S<> parsing bug\n";
65 print "Expected\n========\n$expected\nOutput\n======\n$output\n";
70 # Below the marker are bits of POD and corresponding expected text output.
71 # This is used to test specific features or problems with Pod::Text. The
72 # input and output are separated by lines containing only ###.
79 This C<.> should be quoted.
82 This "." should be quoted.
87 =head1 CE<lt>E<gt> WITH SPACES
89 What does C<< this. >> end up looking like?
92 What does "this." end up looking like?
97 =head1 Test of SE<lt>E<gt>
99 This is some S< > whitespace.
102 This is some whitespace.