# $Id: basic.t,v 1.4 2002/01/28 02:56:19 eagle Exp $
#
# basic.t -- Basic tests for podlators.
#
# Copyright 2001 by Russ Allbery <rra@stanford.edu>
#
# under the same terms as Perl itself.
BEGIN {
chdir 't' if -d 't';
} else {
}
$| = 1;
print "1..11\n";
}
END {
}
# Find the path to the test source files. This requires some fiddling when
# these tests are run as part of Perl core.
my $file = shift;
} else {
return $file;
}
}
$loaded = 1;
print "ok 1\n";
# Hard-code a few values to try to get reproducible results.
# Map of translators to file extensions to find the formatted output to
# compare against.
'Pod::Text' => 'txt',
'Pod::Text::Color' => 'clr',
'Pod::Text::Overstrike' => 'ovr',
'Pod::Text::Termcap' => 'cap');
# Set default options to match those of pod2man and pod2text.
my $n = 2;
for (sort keys %translators) {
$n++;
# For Pod::Man, strip out the autogenerated header up to the .TH title
# line. That means that we don't check those things; oh well. The header
# changes with each version change or touch of the input file.
local $_;
} else {
}
{
local $/;
# OS/390 is EBCDIC, which uses a different character for ESC
# apparently. Try to convert so that the test still works.
}
print "ok $n\n";
} else {
print "not ok $n\n";
}
}
$n++;
}