Change 14459 by jhi@alpha on 2002/01/28 02:28:10

        Upgrade to podlators 1.20.

Affected files ...

.... //depot/perl/lib/Pod/Text/Overstrike.pm#7 edit
.... //depot/perl/lib/Pod/t/basic.t#9 edit

Differences ...

==== //depot/perl/lib/Pod/Text/Overstrike.pm#7 (text) ====
Index: perl/lib/Pod/Text/Overstrike.pm
--- perl/lib/Pod/Text/Overstrike.pm.~1~ Sun Jan 27 19:45:06 2002
+++ perl/lib/Pod/Text/Overstrike.pm     Sun Jan 27 19:45:06 2002
@@ -1,5 +1,5 @@
 # Pod::Text::Overstrike -- Convert POD data to formatted overstrike text
-# $Id: Overstrike.pm,v 1.6 2001/11/28 01:16:54 eagle Exp $
+# $Id: Overstrike.pm,v 1.7 2002/01/28 01:55:42 eagle Exp $
 #
 # Created by Joe Smith <[EMAIL PROTECTED]> 30-Nov-2000
 #   (based on Pod::Text::Color by Russ Allbery <[EMAIL PROTECTED]>)
@@ -36,7 +36,7 @@
 # Don't use the CVS revision as the version, since this module is also in Perl
 # core and too many things could munge CVS magic revision strings.  This
 # number should ideally be the same as the CVS revision in podlators, however.
-$VERSION = 1.06;
+$VERSION = 1.07;
 
 
 ##############################################################################
@@ -109,8 +109,8 @@
     my $spaces = ' ' x $$self{MARGIN};
     my $width = $$self{width} - $$self{MARGIN};
     while (length > $width) {
-        if (s/^((?:(?:[^\n]\cH)?[^\n]){0,$width})(\Z|\s+)//
-            || s/^((?:(?:[^\n]\cH)?[^\n]){$width})//) {
+        if (s/^((?:(?:[^\n][\b])?[^\n]){0,$width})(\Z|\s+)//
+            || s/^((?:(?:[^\n][\b])?[^\n]){$width})//) {
             $output .= $spaces . $1 . "\n";
         } else {
             last;
@@ -129,8 +129,8 @@
 # version.
 sub strip_format {
     my ($self, $text) = @_;
-    $text =~ s/(.)\cH\1/$1/g;
-    $text =~ s/_\cH//g;
+    $text =~ s/(.)[\b]\1/$1/g;
+    $text =~ s/_[\b]//g;
     return $text;
 }
 

==== //depot/perl/lib/Pod/t/basic.t#9 (text) ====
Index: perl/lib/Pod/t/basic.t
--- perl/lib/Pod/t/basic.t.~1~  Sun Jan 27 19:45:06 2002
+++ perl/lib/Pod/t/basic.t      Sun Jan 27 19:45:06 2002
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# $Id: basic.t,v 1.3 2001/11/26 09:24:37 eagle Exp $
+# $Id: basic.t,v 1.4 2002/01/28 02:56:19 eagle Exp $
 #
 # basic.t -- Basic tests for podlators.
 #
@@ -49,7 +49,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,7 +77,6 @@
         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>;
@@ -98,16 +97,19 @@
         my $output = <OUTPUT>;
         close MASTER;
         close OUTPUT;
+
+        # OS/390 is EBCDIC, which uses a different character for ESC
+        # apparently.  Try to convert so that the test still works.
+        if ($^O eq 'os390' && $_ eq 'Pod::Text::Termcap') {
+            $output =~ tr/\033/\047/;
+        }
+
         if ($master eq $output) {
             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++;
End of Patch.

Reply via email to