On Wed, Aug 20, 2003 at 02:06:04PM +0100, Fergal Daly wrote:
> > Work under the assumption that each subplan is not aware of the state
> > of the overall test. This will produce the most useful protocol.
>
> In the scheme mentioned, the only thing the sub-plan is aware of is it's
> name/number, they don't know or care about the progress of any other blocks,
> all they know is that any tests run as part of this plan should have the
> number prepended to them and when it's finished it should output a comment
> perhaps or maybe a test result indicate if the plan was adhered to,
That's subtests having overall test state. Ideally don't want the subtests
to have *any* awareness that they're being run as a subtest.
Again, consider the following:
local $ENV{FOO} = 'bar';
system("$^X foo.t");
local $ENV{FOO} = '';
system("%^X foo.t");
{ local $ENV{FOO};
delete $ENV{FOO};
system("$^X foo.t");
}
A cheap way to run a single test in a variety of different environments.
Or...
foreach my $test (glob("t/subdir/*.t")) {
system("$^X $test");
}
the world's simplest test harness.
--
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/
Stupid am I? Stupid like a fox!