-----BEGIN PGP SIGNED MESSAGE-----

Moin,

On 24-Jun-03 Michael G Schwern carved into stone:
> On Tue, Jun 24, 2003 at 10:59:43AM +0200, Tels wrote:
>> > On Mon, Jun 23, 2003 at 05:49:06PM +0100, Fergal Daly wrote:
>> > Good idea.  Too bad about the plan calculation hackery necesssary. :(
>> 
>> <hat class="devel">
>> Can't nowarings() call Test::More::plan_add(1) or something like this?
>> </hat>
> 
> Consider the following.
> 
>     use Test::More;
>     use Test::Warn::None;
>     plan tests => 42;
> 
> To make this work I'd have to overhaul the internal Test::Builder
> planning system to allow Test::Warn::None to say "I'm going to add an
> extra test, please remember this fact".  I can be convinced its worth it.

IIUC, we have:

        # manual way
        use Test::More;
        use Test::Warn::None;

        BEGIN 
          {
          plan => tests 1 + 1; # one extra for no warnings
          }
        ok (....)

        no_warnings();

and:

        # automatic way (not yet)
        use Test::More;
        use Test::Warn::None;
        BEGIN
          {
          plan tests => 1;
          }
        ok (...);
        no_warnings();        

Neither the manual way nor the automatic way can be "fooled", except that
you remove the "use Test::Warn::None" line. (Either way would
screem if the no_warnings() would no longer be called). So as a vivid plan
user, I would be for the way that requires less typing.

Actually, I can see that Test::Warn::None could make the no_warnings() line
obsolete by calling this automatically in an END block. So:

        # fully automatic way, washes your socks and makes coffee
        use Test::More;
        use Test::Warn::None;
        BEGIN { plan tests => 1; }
        ok (...);

(use Test::Warn::None qw/auto/ or something might also work if you
don't want to change the interface)

As to the "overhaul": wouldn't one extra variable with the "extra tests do
plan for" be enough? Sorry, I probably assume to much simplicity behind
the scenes :)

I would like this, because I plan to use Test::Warn on more than one 20+
test-scripts testsuite, and I could even see how this could be added to the
core which has even more scripts :)

Best wishes,

Te"feels bad for just wanting more features without any contribution"ls

- -- 
 Signed on Tue Jun 24 12:36:15 2003 with http://bloodgate.com/tels.asc

 perl -MDev::Bollocks -le'print Dev::Bollocks->rand()'
 continuously deploy efficient functionalities

 http://www.notcpa.org/          You have the freedom to run any code. Yet.
 http://bloodgate.com/perl       My current Perl projects

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.

iQEVAwUBPvgppncLPEOTuEwVAQF0oQf+OfU+k7Z3Rv02khEObEo+W/LMQgNpkmPS
TpigCsLOy8Mnk1y4wRY+iGqKyydXvAI8MtmFnYl+90L4xi3R/uifDz5rwhoxoXJk
e8Xx8ZXU9koijK4hCHZgQ2YBE9rt8qmfSo/elEbLBxT929NNyZeaKhw9tpHbAnNq
NKTIYAmv0nfJMhLdJofXXOgHvUmbkzuE4L5B5hCoC1Ej1hLdTcTc8hzJoOjKX41y
3ST8rBAZi/bzgeG4EnSS2maDiRdt5hvNd6g29XDoo9XujjplQjYEuuMi2nzanxj9
MuI3mXg8qE+pHJjqO/WSbnMqQl9LDxkpYkbIlDlHHMUyQHP8okavzQ==
=MU0t
-----END PGP SIGNATURE-----

Reply via email to