develooper Front page | perl.perl5.porters | Postings from February 2009

[PATCH] Extra regex test in t/op/pat.t

Thread Next
From:
Bram
Date:
February 15, 2009 09:51
Subject:
[PATCH] Extra regex test in t/op/pat.t
Message ID:
20090215185207.gsnhhqdegckws0co@horde.wizbit.be
When playing with the re engine in an attempt to fix a bug I  
(unsurprisingly) broke the re engine.
What was a bit more suprising is that noone of the retest catched it.

The only tests that failed were some tests in  
../lib/ExtUtils/ParseXS/t/basic (and all other tests that used ParseXS).

So, attached is a patch that adds a missing regression test.

The test:

#!/usr/bin/perl

my $re = qr/A(??{"1"})/;
if ("A1B" =~ m/^((??{ $re }))((??{"B"}))$/) {
   print "Match: $1 --- $2";
}
__END__

Normal output:
   Match: A1 --- B

On my broken perl the output was:
   Match: --- B


Kind regards,

Bram


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