Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Friday December 28, 2007
12:00 PM

More Test::Aggregate Work

[ #35227 ]

In doing some more work with Test::Aggregate, I discovered that many of our tests rely on $0 (script name) being set. As it turns out, you can assign to $0. The current API for Test::Aggregate now looks something like this:

my $tests = Test::Aggregate->new(
        dirs          => 'aggtests/',
        dump          => 'dump.t',     # optional
        shuffle       => 1,            # optional
        matching      => qr/customer/, # optional
        set_filenames => 1,            # optional (sets $0)

I also tried to clean up my Test::Builder hack by properly subclassing it. I gave up after about half an hour since it's not designed to be subclassed. My original hack works just fine.

You can now randomly order the tests (very useful for shaking out bogus state assumptions), run tests from multiple directories, and only run tests matching a given regex. Hopefully this will be on the CPAN soon.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.