develooper Front page | perl.perl5.porters | Postings from July 2016

[perl #128432] [PATCH] Failures in t/re/regexp.t should show theexpected result (more clearly)

From:
Tony Cook via RT
Date:
July 11, 2016 00:36
Subject:
[perl #128432] [PATCH] Failures in t/re/regexp.t should show theexpected result (more clearly)
Message ID:
rt-4.0.18-18833-1468197382-1135.128432-15-0@perl.org
On Sun Jun 19 00:00:59 2016, demerphq wrote:
> FWIW, it would be easier to assess if you included what the output
> would look like with your patch.
> 
> But at the same time, IMO this patch is fine.

A failing test changes from (I changed the expected-expr for the first test):

not ok 10 () abc:abc:y:$&:abx => 'abc', match=1
# $subject = "abc";
# 
# $got = "abc";
# 
#                 ;
#                 $match = ($subject =~ m'abc') while $c--;
#                 $got = "$&";

to:

not ok 10 () abc:abc:y:$&:abx => 'abc', match=1
# $subject = "abc";
# 
#                 ;
#                 $match = ($subject =~ m'abc') while $c--;
#                 $got = "$&";
# 
# $got = "abc";
# 
# $expected = "abx";

which I think is more readable.

Applied as 6ea2424c9bce5f5733208cdb4ff57aef6c63fbc7 and cf549b97af10073cdfe2efa120d97a5b53ecd85c.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=128432



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About