On Mon Mar 29 06:07:42 2010, SREZIC wrote:
Show quoted text> On Sat Feb 14 05:06:36 2009, ANDK wrote:
> > Around patch 32740 to bleadperl your test starts failing like so:
> >
> > t/02_Params-Profile-Functions....
> > # Failed test 'PC: Correctly merged profile'
> > # at t/02_Params-Profile-Functions.t line 178.
> > # Structures begin differing at:
> > # $got->{paramopt}{allow} = (?-xism:^[0-9]+$)
> > # $expected->{paramopt}{allow} = (?-xism:(?-xism:^[0-9]+$))
> > # Looks like you failed 1 test of 18.
> > Dubious, test returned 1 (wstat 256, 0x100)
> > Failed 1/18 subtests
> >
> >
> > The reason is that at that time the regular expression got an overhaul.
> >
> > The fix should be obvious from the above output.
> >
> > Hope that helps && Regards,
> >
>
> It rather looks like a bug in perl 5.12.0:
>
> $ /usr/perl-5.12.0-RC0/bin/perl -MData::Dumper -e '$x=
> qr/(?-xism:^[a-z]+$)/; warn Dumper $x'
> $VAR1 = qr/(?-xism:(?-xism:^[a-z]+$))/;
>
> In previous versions the regexp options did not appear twice.
>
Sorry, this is not the case. The problem is, that is_deeply cannot
recognize that both regexps are equivalent. Here's a simpler test case:
$ /usr/perl-5.10.1-test/bin/perl -MTest::More=no_plan -e
'is_deeply([qr/(?-xism:^[a-z]+$)/],[qr/^[a-z]+$/])'
ok 1
1..1
$ /usr/perl-5.12.0-RC0/bin/perl -MTest::More=no_plan -e
'is_deeply([qr/(?-xism:^[a-z]+$)/],[qr/^[a-z]+$/])'
not ok 1
# Failed test at -e line 1.
# Structures begin differing at:
# $got->[0] = (?-xism:(?-xism:^[a-z]+$))
# $expected->[0] = (?-xism:^[a-z]+$)
1..1
# Looks like you failed 1 test of 1.