develooper Front page | perl.perl5.porters | Postings from April 2006

Re: [PATCH] t/op/pat.t using test.pl

Thread Previous
From:
H.Merijn Brand
Date:
April 27, 2006 03:36
Subject:
Re: [PATCH] t/op/pat.t using test.pl
Message ID:
20060427123705.243dd595@pc09
On Thu, 27 Apr 2006 12:32:18 +0200, David Landgren <david@landgren.net> wrote:

> I've finished rewriting t/op/pat.t. Rather than sending the diff, I've 
> sent the file.
> 
> The new version loses 12k of make-work code for equivalent 
> functionality. There are a few test that I have doubts about, these are 
> marked by '???'.
> 
> There are two different techniques implemented to test regexps that emit 
> warnings. One is a closure-in-closure contraption (line 609) that I 
> think is broken as shipped. I started to deobfuscate it, and then I 
> stumbled upon a much simpler mechanism that works (line 1741). I think 
> the former should just be scrapped.
> 
> In a further iteration I'd like to break out all the
> 
>    ok(/(expr)/ && $1 eq 'foo', 'my test')
> 
> tests into
> 
>    ok(/(expr)/, 'my test match');
>    cmp_ok($1, 'eq', 'foo', 'my test result');
> 
> And also move blocks of tests around to put similar tests together, 
> rather than having them dotted around the file in an order that merely 
> reflects how they accreted over time.

grinder, it's not /my/ call to apply this, but fwiw, I am all in favour of
all the above.

> I've tested it against a threaded and non-threaded build of this 
> morning's blead. It would be good to take it for a spin on an EBCDIC 
> platform before committing it.


-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.9.x  on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.0, AIX 4.3 & 5.2, and Cygwin.       http://qa.perl.org
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org
                       http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Previous


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