You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Doug MacEachern <do...@covalent.net> on 2001/08/30 19:40:46 UTC
running subtests
it is now possible to write .t tests in such a way that only selected
tests will be run. the .t's simply need to switch from using 'ok ...'
to 'sok { ... }'. where the argument to sok is a subroutine reference
who's return value will be passed to 'ok'. if subtests are specified
only those will be run/passed to ok, the rest will be skipped.
so for example, you can now do this:
modules/env....1..5
ok 1 # skip skipping this subtest
ok 2 # skip skipping this subtest
set: EXPECT ->mod_env test environment variable<- ACTUAL ->mod_env test environment variable<-
ok 3
ok 4 # skip skipping this subtest
unset: EXPECT ->(none)<- ACTUAL ->(none)<-
ok 5
ok, 3/5 skipped: skipping this subtest
All tests successful.
Files=1, Tests=5, 2 wallclock secs ( 1.09 cusr + 0.07 csys = 1.16 CPU)
Re: running subtests
Posted by john sachs <js...@covalent.net>.
that rules.
Re: running subtests
Posted by Doug MacEachern <do...@covalent.net>.
On Thu, 30 Aug 2001, Doug MacEachern wrote:
> so for example, you can now do this:
whoops, left out this part:
% ./t/TEST -v t/modules/env.t 3 5
> modules/env....1..5
> ok 1 # skip skipping this subtest
> ok 2 # skip skipping this subtest
> set: EXPECT ->mod_env test environment variable<- ACTUAL ->mod_env test environment variable<-
> ok 3
> ok 4 # skip skipping this subtest
> unset: EXPECT ->(none)<- ACTUAL ->(none)<-
> ok 5
> ok, 3/5 skipped: skipping this subtest
> All tests successful.
> Files=1, Tests=5, 2 wallclock secs ( 1.09 cusr + 0.07 csys = 1.16 CPU)
>