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

[PATCH] t/op/sort.t using test.pl

Thread Next
From:
David Landgren
Date:
April 27, 2006 09:26
Subject:
[PATCH] t/op/sort.t using test.pl
Message ID:
4450F094.2010907@landgren.net
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

   http://www.landgren.net/perl/sort.html

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

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