2 # $Id: text-options.t,v 1.2 2002/08/04 03:38:24 eagle Exp $
4 # text-options.t -- Additional tests for Pod::Text options.
6 # Copyright 2002 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;
35 next until $_ eq "###\n";
37 last if $_ eq "###\n";
38 my ($option, $value) = split;
39 $options{$option} = $value;
41 open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
43 last if $_ eq "###\n";
47 my $parser = Pod::Text->new (%options) or die "Cannot create parser\n";
48 $parser->parse_from_file ('tmp.pod', 'out.tmp');
49 open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
56 unlink ('tmp.pod', 'out.tmp');
59 last if $_ eq "###\n";
62 if ($output eq $expected) {
66 print "Expected\n========\n$expected\nOutput\n======\n$output\n";
71 # Below the marker are bits of POD and corresponding expected text output.
72 # This is used to test specific features or problems with Pod::Text. The
73 # input and output are separated by lines containing only ###.
119 This is some body text that is long enough to be a paragraph that wraps,
120 thereby testing margins with wrapped paragraphs.
122 This is some verbatim text.
128 This is a test of an indented paragraph.
130 This is another indented paragraph.
135 This is some body text that is long enough to be a paragraph that
136 wraps, thereby testing margins with wrapped paragraphs.
138 This is some verbatim text.
140 Test This is a test of an indented paragraph.
142 This is another indented paragraph.