develooper Front page | perl.perl5.porters | Postings from December 2001

[ PATCH] Cygwin: one down one to go

Thread Next
From:
H.Merijn Brand
Date:
December 31, 2001 08:03
Subject:
[ PATCH] Cygwin: one down one to go
Message ID:
20011231170025.E05B.H.M.BRAND@hccnet.nl
Low hanging fruit. Three part pach

1. Cosmetic change
2. The solution to the problem
3. More verbose detection /of/ the problem, if it occurs in a different matter

--- lib/Pod/t/basic.t	Mon Nov 26 13:34:07 2001
+++ /F/tmp/basic.t	Mon Dec 31 17:01:11 2001
@@ -49,7 +50,7 @@
 
 # Hard-code a few values to try to get reproducible results.
 $ENV{COLUMNS} = 80;
-$ENV{TERM} = 'xterm';
+$ENV{TERM}    = 'xterm';
 $ENV{TERMCAP} = 'xterm:co=80:do=^J:md=\E[1m:us=\E[4m:me=\E[m';
 
 # Map of translators to file extensions to find the formatted output to
@@ -77,6 +78,7 @@
         open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
         open (OUTPUT, "> out.$translators{$_}")
             or die "Cannot create out.$translators{$_}: $!\n";
+        binmode OUTPUT;
         local $_;
         while (<TMP>) { last if /^\.TH/ }
         print OUTPUT while <TMP>;
@@ -101,8 +103,12 @@
             print "ok $n\n";
             unlink "out.$translators{$_}";
         } else {
+            my @master = split m/[\r\n]+/, $master;
+            my @output = split m/[\r\n]+/, $output;
             print "not ok $n\n";
             print "# Non-matching output left in out.$translators{$_}\n";
+            "@master" eq "@output" and
+		print "# But the line-end stripped versions are equal\n";
         }
     }
     $n++;

-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.7.2 & 630 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
     WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About