Dave Rolsky <[EMAIL PROTECTED]> writes: > For my Alzabo tests, I do some weird stuff involving forking off processes > during tests and running the same (basically same) set of tests multiple > times, each time with different modules loaded. The parent process > calculates how many tests will be involved in each run and how many runs > will occur to print the '1..?' stuff at the beginning. > > As part of this, I need to be able to tell the forked process to start its > test count at a certain number (greater than 1). > > There's no way to do this with Test::Simple currently. What I need is to > be able to set $Planned_Tests and $Num_Tests without print the "1..$x" bit > again. > > Either that or set a $Offset so that when it prints the test number it > prints $Num_Tests + $Offset.
If it's not a dumb question, why are you doing it that way? If you were using PerlUnit, aka Test::Unit::TestCase, you could do something like: package ParentTest; use base 'Test::Unit::TestCase'; sub setup { ... } sub test_foo { ... } Then simply inherit from it for each different set of tests. package DerivedTest; use base 'ParentTest'; use SomeModule; Then your /t would have files like: derived.t: use Test::Unit::HarnessUnit; Test::Unit::HarnessUnit->new->start('DerivedTest'); which could be programmatically generated. Thinking about it, you could probably move the module loads into the test scripts and have them just run the basic test, which would, in turn, probably mean you could get away with just using Test::More/Simple -- Piers Cawley www.iterative-software.com