Closed p5pRT closed 15 years ago
While testing [perl #27603] to see if the warning is gone I noticed this:
perl-5.10.0 -wle 'if (123 =~ /^(\d)(((??{1 + $^N})))+$/) { print
"match"; } else { print "no match"; }'
match
perl-blead -wle 'if (123 =~ /^(\d)(((??{1 + $^N})))+$/) { print
"match"; } else { print "no match"; }'
no match
And:
perl-5.10.0 -wle 'if (122 =~ /^(\d)(((??{1 + $^N})))+$/) { print
"match"; } else { print "no match"; }'
no match
perl-blead -wle 'if (122 =~ /^(\d)(((??{1 + $^N})))+$/) { print
"match"; } else { print "no match"; }'
match
Is this change of behaviour intended?
Kind regards\,
Bram
On Sat Jun 21 11:03:51 2008\, p5p@perl.wizbit.be wrote:
While testing [perl #27603] to see if the warning is gone I noticed this:
perl-5.10.0 -wle 'if (123 =~ /^(\d)(((??{1 + $^N})))+$/) { print
"match"; } else { print "no match"; }' matchperl-blead -wle 'if (123 =~ /^(\d)(((??{1 + $^N})))+$/) { print
"match"; } else { print "no match"; }' no matchAnd:
perl-5.10.0 -wle 'if (122 =~ /^(\d)(((??{1 + $^N})))+$/) { print
"match"; } else { print "no match"; }' no matchperl-blead -wle 'if (122 =~ /^(\d)(((??{1 + $^N})))+$/) { print
"match"; } else { print "no match"; }' matchIs this change of behaviour intended?
If I revert patch 32857 then it behaves in the same way as 5.10.0.
http://public.activestate.com/cgi-bin/perlbrowse/p/32857
Kind regards\,
Bram
The RT System itself - Status changed from 'new' to 'open'
On Sat Jun 21 11:03:51 2008\, p5p@perl.wizbit.be wrote:
While testing [perl #27603] to see if the warning is gone I noticed this:
perl-5.10.0 -wle 'if (123 =~ /^(\d)(((??{1 + $^N})))+$/) { print
"match"; } else { print "no match"; }' matchperl-blead -wle 'if (123 =~ /^(\d)(((??{1 + $^N})))+$/) { print
"match"; } else { print "no match"; }' no matchAnd:
perl-5.10.0 -wle 'if (122 =~ /^(\d)(((??{1 + $^N})))+$/) { print
"match"; } else { print "no match"; }' no matchperl-blead -wle 'if (122 =~ /^(\d)(((??{1 + $^N})))+$/) { print
"match"; } else { print "no match"; }' match
PL_reglastparen and PL_reglastcloseparen contains a pointer are set to & rex->lastparen and & rex->lastcloseparen. In case END rex is modifie but PL_reglastparen and PL_reglastcloseparen is not. Some part of the codes access PL_reglastparen while other parts use rex-
lastparen.
The attached patch corrects this and adds 3 assertions.
I'm currently unable to proof (with a test case) that the code in case EVAL_ab is really nessesary... Logically speaking it is nessesary but I do not know if it can cause test failures.
Also in the patch are missing regressions between 5.8 -> 5.10 and 5.10 -
5.11. (and a test script that contains these regressions)
The script outputs the following failures: (stripped to show only the not ok)
$ perl-5.8.9 rt-56194.pl (same for perl-5.8.8) not ok 23 - ctl_n 8 # Failed test 'ctl_n 8' # at rt-56194.pl line 62. # got: 'undef undef undef' # expected: 'bla blubb undef' not ok 24 - plus 8 # Failed test 'plus 8' # at rt-56194.pl line 63. # got: 'undef undef undef' # expected: 'a b undef' not ok 73 - match 9 # Failed test 'match 9' # at rt-56194.pl line 192. not ok 74 - ctl_n 9 # Failed test 'ctl_n 9' # at rt-56194.pl line 198. # got: '' # expected: '1 2 abc' not ok 75 - plus 9 # Failed test 'plus 9' # at rt-56194.pl line 199. # got: '' # expected: '1 2 abc' not ok 76 - str 9 # Failed test 'str 9' # at rt-56194.pl line 200. # got: '' # expected: '$1 = abc\, $2 = undef\, $3 = undef\, $4 = undef\, $5 = undef'
$ perl-5.10.0 rt-56194.pl
not ok 2 - ctl_n 1
# Failed test 'ctl_n 1'
# at rt-56194.pl line 62.
# got: 'bla undef bla'
# expected: 'bla blubb bla'
not ok 3 - plus 1
# Failed test 'plus 1'
# at rt-56194.pl line 63.
# got: 'a undef a'
# expected: 'a b a'
not ok 5 - ctl_n 2
# Failed test 'ctl_n 2'
# at rt-56194.pl line 62.
# got: 'bla undef \
$ perl-maint-5.10 rt-56194.pl
not ok 17 - ctl_n 6
# Failed test 'ctl_n 6'
# at rt-56194.pl line 62.
# got: 'undef blubb bla'
# expected: 'bla blubb bla'
not ok 18 - plus 6
# Failed test 'plus 6'
# at rt-56194.pl line 63.
# got: 'undef b a'
# expected: 'a b a'
not ok 20 - ctl_n 7
# Failed test 'ctl_n 7'
# at rt-56194.pl line 62.
# got: 'undef blubb bla'
# expected: 'bla blubb bla'
not ok 21 - plus 7
# Failed test 'plus 7'
# at rt-56194.pl line 63.
# got: 'undef b a'
# expected: 'a b a'
not ok 26 - ctl_n 9
# Failed test 'ctl_n 9'
# at rt-56194.pl line 62.
# got: 'undef blubb bla'
# expected: 'bla blubb bla'
not ok 27 - plus 9
# Failed test 'plus 9'
# at rt-56194.pl line 63.
# got: 'undef b a'
# expected: 'a b a'
not ok 29 - ctl_n 10
# Failed test 'ctl_n 10'
# at rt-56194.pl line 62.
# got: 'bla blubb undef'
# expected: 'bla blubb \
$ perl-blead rt-56194.pl
not ok 17 - ctl_n 6
# Failed test 'ctl_n 6'
# at rt-56194.pl line 62.
# got: 'undef blubb bla'
# expected: 'bla blubb bla'
not ok 18 - plus 6
# Failed test 'plus 6'
# at rt-56194.pl line 63.
# got: 'undef b a'
# expected: 'a b a'
not ok 20 - ctl_n 7
# Failed test 'ctl_n 7'
# at rt-56194.pl line 62.
# got: 'undef blubb bla'
# expected: 'bla blubb bla'
not ok 21 - plus 7
# Failed test 'plus 7'
# at rt-56194.pl line 63.
# got: 'undef b a'
# expected: 'a b a'
not ok 26 - ctl_n 9
# Failed test 'ctl_n 9'
# at rt-56194.pl line 62.
# got: 'undef blubb bla'
# expected: 'bla blubb bla'
not ok 27 - plus 9
# Failed test 'plus 9'
# at rt-56194.pl line 63.
# got: 'undef b a'
# expected: 'a b a'
not ok 29 - ctl_n 10
# Failed test 'ctl_n 10'
# at rt-56194.pl line 62.
# got: 'bla blubb undef'
# expected: 'bla blubb \
$ patched-blead rt-56194.pl => all OK
The test script might contain some redundant tests but I feel it is better to include a regression test too much then one too little...
Kind regards\,
Bram
2009/3/11 Bram via RT \perlbug\-followup@​perl\.org:
On Sat Jun 21 11:03:51 2008\, p5p@perl.wizbit.be wrote:
While testing [perl #27603] to see if the warning is gone I noticed this:
perl-5.10.0 -wle 'if (123 =~ /^(\d)(((??{1 + $^N})))+$/) { print "match"; } else { print "no match"; }' match
perl-blead -wle 'if (123 =~ /^(\d)(((??{1 + $^N})))+$/) { print "match"; } else { print "no match"; }' no match
And:
perl-5.10.0 -wle 'if (122 =~ /^(\d)(((??{1 + $^N})))+$/) { print "match"; } else { print "no match"; }' no match
perl-blead -wle 'if (122 =~ /^(\d)(((??{1 + $^N})))+$/) { print "match"; } else { print "no match"; }' match
PL_reglastparen and PL_reglastcloseparen contains a pointer are set to & rex->lastparen and & rex->lastcloseparen. In case END rex is modifie but PL_reglastparen and PL_reglastcloseparen is not. Some part of the codes access PL_reglastparen while other parts use rex-
lastparen.
The attached patch corrects this and adds 3 assertions.
I'm currently unable to proof (with a test case) that the code in case EVAL_ab is really nessesary... Logically speaking it is nessesary but I do not know if it can cause test failures.
Also in the patch are missing regressions between 5.8 -> 5.10 and 5.10 -
5.11. (and a test script that contains these regressions)
The script outputs the following failures: (stripped to show only the not ok) [snip]
$ patched-blead rt-56194.pl => all OK
The test script might contain some redundant tests but I feel it is better to include a regression test too much then one too little...
Applied to blead as commit 34a81e2b89e80eb8560606e2b29037d4da625156.
Thanks.
Could I ask tho that you provide a follow up with a patch that documents the tests a little bit?
Its a bit confusing. I think i understand it\, at least enough to apply it\, but id like to see some comments added anyway just to be sure before you forget. :-)
Yves
-- perl -Mre=debug -e "/just|another|perl|hacker/"
According to Bram\, this issue has been resolved.
@tsee - Status changed from 'open' to 'resolved'
Citeren demerphq \demerphq@​gmail\.com:
[snip]
Applied to blead as commit 34a81e2b89e80eb8560606e2b29037d4da625156.
Thanks.
Could I ask tho that you provide a follow up with a patch that documents the tests a little bit?
Its a bit confusing. I think i understand it\, at least enough to apply it\, but id like to see some comments added anyway just to be sure before you forget. :-)
Patch that adds some basic documentation about the test structure attached.
Best regards\,
Bram
2009/5/30 Bram \p5p@​perl\.wizbit\.be:
Citeren demerphq \demerphq@​gmail\.com:
[snip]
Applied to blead as commit 34a81e2b89e80eb8560606e2b29037d4da625156.
Thanks.
Could I ask tho that you provide a follow up with a patch that documents the tests a little bit?
Its a bit confusing. I think i understand it\, at least enough to apply it\, but id like to see some comments added anyway just to be sure before you forget. :-)
Patch that adds some basic documentation about the test structure attached.
Thanks\, applied as b73790d3c9fb2026c569344bfe353223af9bdbea
Migrated from rt.perl.org#56194 (status was 'resolved')
Searchable as RT56194$