2 # $Id: man.t,v 1.1 2002/01/02 09:03:28 eagle Exp $
4 # man.t -- Additional specialized tests for Pod::Man.
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;
34 next until $_ eq "###\n";
35 open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
37 last if $_ eq "###\n";
41 my $parser = Pod::Man->new or die "Cannot create parser\n";
42 $parser->parse_from_file ('tmp.pod', 'out.tmp');
43 open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
44 while (<TMP>) { last if /^\.TH/ }
51 unlink ('tmp.pod', 'out.tmp');
54 last if $_ eq "###\n";
57 if ($output eq $expected) {
61 print "Expected\n========\n$expected\nOutput\n======\n$output\n";
66 # Below the marker are bits of POD and corresponding expected nroff output.
67 # This is used to test specific features or problems with Pod::Man. The input
68 # and output are separated by lines containing only ###.
75 gcc - GNU project C and C++ compiler
79 Other mentions of C++.
82 gcc \- GNU project C and C++ compiler
85 Other mentions of \*(C+.