Change 34427 by [EMAIL PROTECTED] on 2008/09/26 20:09:59

        Integrate:
        [ 34377]
        Subject: [PATCH] Don't reuse temp files in tests
        From: "Jerry D. Hedden" <[EMAIL PROTECTED]>
        Message-ID: <[EMAIL PROTECTED]>
        Date: Tue, 16 Sep 2008 16:35:11 -0400
        
        [ 34400]
        Change 30638 to 5.8.x inadvertently introduced (at lest) two
        regressions into the regexp engine. Add tests for the constructions
        that regressed, to prevent any future change falling foul of the same
        problem.

Affected files ...

... //depot/maint-5.10/perl/lib/charnames.t#3 integrate
... //depot/maint-5.10/perl/lib/strict.t#4 integrate
... //depot/maint-5.10/perl/lib/subs.t#3 integrate
... //depot/maint-5.10/perl/t/op/re_tests#6 integrate

Differences ...

==== //depot/maint-5.10/perl/lib/charnames.t#3 (text) ====
Index: perl/lib/charnames.t
--- perl/lib/charnames.t#2~34341~       2008-09-11 03:07:18.000000000 -0700
+++ perl/lib/charnames.t        2008-09-26 13:09:59.000000000 -0700
@@ -271,10 +271,8 @@
 
 # ---- Alias extensions
 
-my $tmpfile = tempfile();
 my $alifile = File::Spec->catfile(File::Spec->updir, qw(lib unicore 
xyzzy_alias.pl));
 my $i = 0;
-END { if ($tmpfile) { 1 while unlink $tmpfile; } }
 
 my @prgs;
 {   local $/ = undef;
@@ -285,6 +283,7 @@
 for (@prgs) {
     my ($code, $exp) = ((split m/\nEXPECT\n/), '$');
     my ($prog, $fil) = ((split m/\nFILE\n/, $code), "");
+    my $tmpfile = tempfile();
     open my $tmp, "> $tmpfile" or die "Could not open $tmpfile: $!";
     print $tmp $prog, "\n";
     close $tmp or die "Could not close $tmpfile: $!";
@@ -322,7 +321,6 @@
         print "not ";
        }
     print "ok ", ++$i, "\n";
-    1 while unlink $tmpfile;
     $fil or next;
     1 while unlink $alifile;
     }

==== //depot/maint-5.10/perl/lib/strict.t#4 (text) ====
Index: perl/lib/strict.t
--- perl/lib/strict.t#3~34341~  2008-09-11 03:07:18.000000000 -0700
+++ perl/lib/strict.t   2008-09-26 13:09:59.000000000 -0700
@@ -12,9 +12,7 @@
 my $Is_VMS = $^O eq 'VMS';
 my $Is_MSWin32 = $^O eq 'MSWin32';
 my $Is_NetWare = $^O eq 'NetWare';
-my $tmpfile = tempfile();
 my $i = 0 ;
-END { if ($tmpfile) { 1 while unlink $tmpfile; } }
 
 my @prgs = () ;
 
@@ -65,6 +63,7 @@
        $prog = shift @files ;
        $prog =~ s|\./abc|:abc|g if $^O eq 'MacOS';
     }
+    my $tmpfile = tempfile();
     open TEST, ">$tmpfile" or die "Could not open: $!";
     print TEST $prog,"\n";
     close TEST or die "Could not close: $!";

==== //depot/maint-5.10/perl/lib/subs.t#3 (text) ====
Index: perl/lib/subs.t
--- perl/lib/subs.t#2~34341~    2008-09-11 03:07:18.000000000 -0700
+++ perl/lib/subs.t     2008-09-26 13:09:59.000000000 -0700
@@ -16,9 +16,7 @@
 my $Is_MSWin32 = $^O eq 'MSWin32';
 my $Is_NetWare = $^O eq 'NetWare';
 my $Is_MacOS = $^O eq 'MacOS';
-my $tmpfile = tempfile();
 my $i = 0 ;
-END {  if ($tmpfile) { 1 while unlink $tmpfile} }
 
 for (@prgs){
     my $switch = "";
@@ -44,6 +42,7 @@
        shift @files ;
        $prog = shift @files ;
     }
+    my $tmpfile = tempfile();
     open TEST, ">$tmpfile";
     print TEST $prog,"\n";
     close TEST;

==== //depot/maint-5.10/perl/t/op/re_tests#6 (text) ====
Index: perl/t/op/re_tests
--- perl/t/op/re_tests#5~33947~ 2008-05-28 18:09:23.000000000 -0700
+++ perl/t/op/re_tests  2008-09-26 13:09:59.000000000 -0700
@@ -1345,3 +1345,9 @@
 
 0{50}  000000000000000000000000000000000000000000000000000     y       -       
-
 
+
+# Two regressions in 5.8.x (only) introduced by change 30638
+# Simplification of the test failure in XML::LibXML::Simple:
+/^\s*i.*?o\s*$/s       io\n io y       -       -
+# As reported in #59168 by Father Chrysostomos:
+/(.*?)a(?!(a+)b\2c)/   baaabaac        y       $&-$1   baa-ba
End of Patch.

Reply via email to