On Thu, Mar 15, 2001 at 12:54:34AM +0000, Michael G Schwern wrote:
> Another possibility... use a local __DIE__ handler inside the skip()
> to trap and ignore dies.  We'd have to be careful not to screw up eval
> and $@ in the code we're testing (using $^S), but it will mess up any
> code that relies on its own __DIE__ handler.  

Pondering this last night, I realized you can stack die handlers fairly
easily.

Pondering further, the purpose of skip() is to *not* run the code at
all (it may have nasty side effects).  So it may be necessary for
skip() to take an extra argument that says how many tests are in the
skip block.  Damn.

todo() is salvagable.  Its purpose is to actually try and run the
block.  However, I think it too will need to take an extra argument
saying how many todo tests are expected.


The main question now becomes, when the code in a todo block dies,
should we let it die or keep it alive to continue with the rest of the
tests in the block?  Sort of a Dr. Kevorkian issue.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One
We're talkin' to you, weaselnuts.
        http://www.goats.com/archive/000831.html

Reply via email to