On 7/20/06, Tyler MacDonald <[EMAIL PROTECTED]> wrote:
        Exactly. :-) Take a look at, for instance, IPC::Run's test cases...
an array of sub{} blocks, some of which get skipped over on certain OS'es.
It'd be really easy to accidentally put to ok()'s in one sub{} block and
screw up the count.

But is this really a problem?  Does the plan create a problem?

If you were starting from scratch, you might implement skip like this:

   if( !$some_condition ) {
       skip( "I skipped because of blah" );
   }
   else {
       ok( some_test );
       ok( some_other_test );
   }

Why is it important that "skip" knows that there were two tests to be
run?  Its not going to run them anyway.  What value does this add?
One of the biggest mistakes using skip() is getting the count wrong,
what if that mistake just went away?  Its one of the few places in a
test where you have to count individual tests (the other being the
plan itself).

Reply via email to