On Thu, Apr 29, 2004 at 02:01:12PM +0200, H.Merijn Brand wrote:
> or can I change the plan halfway

Not if you declared the number of tests, the T::H format
requires that the plan be written before tests are run, but you could
just use 'no_plan'.  Then you can just exit() whenever and that's
that.

        use Test::More 'no_plan';
        pass("Test this");
        exit;
        pass("This is never run");

This is much simpler than my other scheme.  If you want to get fancy
you can throw in a skip() before the exit so Test::Harness notes a
skip and displays the reason.

        use Test::More 'no_plan';
        pass("Test this");
        SKIP: { skip "because", 1 }
        exit;
        pass("This is never run");


-- 
Michael G Schwern        [EMAIL PROTECTED]  http://www.pobox.com/~schwern/
There's only one thing to do: MIX HARD LIQUOR and BEER!!!
        -- http://www.angryflower.com/privat.gif

Reply via email to