3 # man-options.t -- Additional tests for Pod::Man options.
5 # Copyright 2002, 2004, 2006, 2008 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;
34 next until $_ eq "###\n";
36 last if $_ eq "###\n";
37 my ($option, $value) = split;
38 $options{$option} = $value;
40 open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
42 last if $_ eq "###\n";
46 my $parser = Pod::Man->new (%options) or die "Cannot create parser\n";
47 open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
48 $parser->parse_from_file ('tmp.pod', \*OUT);
50 open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
51 while (<TMP>) { last if /^\.nh/ }
58 unlink ('tmp.pod', 'out.tmp');
61 last if $_ eq "###\n";
64 if ($output eq $expected) {
68 print "Expected\n========\n$expected\nOutput\n======\n$output\n";
73 # Below the marker are bits of POD and corresponding expected text output.
74 # This is used to test specific features or problems with Pod::Man. The
75 # input and output are separated by lines containing only ###.
84 Beyoncé! Beyoncé! Beyoncé!!
90 Older versions did not convert Beyoncé in verbatim.
94 Beyoncé! Beyoncé! Beyoncé!!
102 Older versions did not convert Beyoncé in verbatim.