Skip Menu |

This queue is for tickets about the Params-Profile CPAN distribution.

Report information
The Basics
Id: 43284
Status: resolved
Priority: 0/
Queue: Params-Profile

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.10
Fixed in: (no value)



Subject: Test fails with bleadperl
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,
On Sat Feb 14 05:06:36 2009, ANDK wrote: Show quoted text
> 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. Regards, Slaven
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.
On Mon Mar 29 06:12:23 2010, SREZIC wrote: Show quoted text
> On Mon Mar 29 06:07:42 2010, SREZIC wrote:
> > 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. Show quoted text
> > > > > > 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. >
Actually is_deeply never worked correctly if it contained regexps. See the bugreport https://rt.cpan.org/Ticket/Display.html?id=53469 . Consequently, with Test::More 0.95_01 Params::Profile also fails with older perls. Regards, Slaven
On Mon Mar 29 18:00:21 2010, SREZIC wrote: Show quoted text
> On Mon Mar 29 06:12:23 2010, SREZIC wrote:
> > On Mon Mar 29 06:07:42 2010, SREZIC wrote:
> > > 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. > >
> > Actually is_deeply never worked correctly if it contained regexps. See > the bugreport https://rt.cpan.org/Ticket/Display.html?id=53469 . > Consequently, with Test::More 0.95_01 Params::Profile also fails with > older perls. > > Regards, > Slaven >
Gentlemen, Thank you for pointing out this (test)-bug. I have uploaded a new release to CPAN. For now with the solution of commenting out the line causing the above issue keeping in mind that is_deeply cannot recursively compare two hashes which contain regex objects. My sincere apologies for the delay. Regards, Michiel