On Tue, Jun 23, 2009 at 04:07:55PM -0400, Michael G Schwern wrote:

> Small change log, big feature.  This version adds subtest(), implemented by
> Ovid.  This allows you to run a bunch of tests with their own plan.
> 
>              use Test::More tests => 3;
> 
>              pass("First test");
> 
>              subtest 'An example subtest' => sub {
>                  plan tests => 2;
> 
>                  pass("This is a subtest");
>                  pass("So is this");
>              };
> 
>              pass("Third test");

Very nice.

One question though.  Why

    subtest "text", sub {};

rather than

    subtest {}, "text";

?

The latter seems more consistent as well as removing a rather annoying bit of
syntax.  Were you worried that "text" might get lost at the end of the sub?

-- 
Paul Johnson - p...@pjcj.net
http://www.pjcj.net

Reply via email to