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

[PATCH] t/op/pat.t using

Thread Next
David Landgren
April 27, 2006 03:32
[PATCH] t/op/pat.t using
Message ID:
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.

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.

"It's overkill of course, but you can never have too much overkill."

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About