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

[PATCH t/op/pat.t] Re: Change 33313 causing failures

Thread Previous | Thread Next
From:
Abigail
Date:
February 15, 2008 03:04
Subject:
[PATCH t/op/pat.t] Re: Change 33313 causing failures
Message ID:
20080215110359.GA24588@abigail.be
On Thu, Feb 14, 2008 at 02:17:57PM -0500, Jerry D. Hedden wrote:
> Change 33313 is causing test suite failures:
> 
> t/op/pat......................................................FAILED--unexpected
> output at test 1308
> t/op/pat_thr..................................................FAILED--unexpected
> output at test 1308
> 
> Capturing the relevant test output:
> 
> ok 1307 - $+{C}	Line 3788
> not ok 1308 - $+{D}	Line 3788 # TODO 1
> not # Failed test at line 3788
> # expected: '???xfoo'
> #   result: ''
> ok 1309 - 18446744073709551615~=/(?<D>(?<A>foo)s+(?<B>bar)?s+(?<C>baz))/	Line
> 3793
> 
> The 'failure' is the extra 'not' before the pound sign.
> I tried to figure out what's causing it, but couldn't.


There's a typo that causes havoc. Here's a fix.



--- t/op/pat.t.orig	2008-02-15 12:05:25.000000000 +0100
+++ t/op/pat.t	2008-02-15 12:05:48.000000000 +0100
@@ -3769,7 +3769,7 @@
     my (@k,@v,@fetch,$res);
     my $count = 0;
     my @names = qw($+{A} $+{B} $+{C} $+{D});
-    if ($s = ~/(?<D>(?<A>foo)\s+(?<B>bar)?\s+(?<C>baz))/) {
+    if ($s =~ /(?<D>(?<A>foo)\s+(?<B>bar)?\s+(?<C>baz))/) {
 	while (my ($k,$v) = each(%+)) {
 	    $count++;
 	}

Thread Previous | 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