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

[PATCH] t/op/sort.t using

Thread Next
David Landgren
April 27, 2006 09:26
[PATCH] t/op/sort.t using
Message ID:
Over lunch I rewrote F<t/op/sort.t>.

It used its own ok() function that behaves like a cmp_ok(). So I gutted 
it and made it call cmp_ok(). Eventually that should get cleaned up, but 
it meant less change in one hit.

Also of interest is that a test half way down switches to package Foo, 
and so the remainder of the script needs main::ok() instead of ok(). 
Which is interesting, since further down there are tests that play 
around with sorts subs defined in one package used in another. I wonder 
if people realised that the current package was not main::...

Again I've explicitly set $" to ' ', on the basis that it reduces an 
assumption on the run-time test environment.

I replaced some regexps to match $@ failures with substr() comparisons. 
I've retained the line numbering; you can compare the before and after 
results at

"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