12 BEGIN { plan tests => 5 };
16 if ($ENV{PERL_CORE}) {
18 my $updir = File::Spec->updir;
19 my $dir = File::Spec->catdir ($updir, 'lib', 'Pod', 'Simple', 't');
20 return File::Spec->catfile ($dir, $file);
26 use Pod::Simple::Text;
27 $Pod::Simple::Text::FREAKYMODE = 1;
29 my $parser = Pod::Simple::Text->new();
39 unless(-e source_path($file)) {
41 print "# But $file doesn't exist!!\n";
45 my $precooked = $file;
48 $precooked =~ s<\.pod><o.txt>s;
50 $parser->output_string(\$outstring);
51 $parser->parse_file(source_path($file));
53 open(IN, $precooked) or die "Can't read-open $precooked: $!";
60 for ($outstring,$compstring) { s/\s+/ /g; s/^\s+//s; s/\s+$//s; }
62 if($outstring eq $compstring) {
66 for ($outstring, $compstring) { tr/ //d; };
67 $outstring eq $compstring;
69 print "# Differ only in whitespace.\n";
74 my $x = $outstring ^ $compstring;
75 $x =~ m/^(\x00*)/s or die;
77 print "# Difference at byte $at...\n";
82 print "# ", substr($outstring,$at,20), "\n";
83 print "# ", substr($compstring,$at,20), "\n";
88 printf "# Unequal lengths %s and %s\n", length($outstring), length($compstring);