Yesterday I was happy to notice that you can use Test::Warn together with
Test::NoWarnings.
So you can test for a watning in a specific test while testing that
nothing else gives a warning.\
Good.     :-)

Today I found out that if you skip_all tests while you have
Test::NoWarnings your test
will fail.
Bad.    :-(


Gabor


The following code:

===============

use Test::More;
use Test::NoWarnings;

plan skip_all => 'Why not?';
plan tests => 2;

ok(1)

===============

gives this output:

1..0 # Skip Why not?
You tried to run a test without a plan at
/root/perl5lib/lib/Test/NoWarnings.pm line 45.
END failed--call queue aborted.

===============

and prove gives this:

===============

t/w......You tried to run a test without a plan at
/root/perl5lib/lib/Test/NoWarnings.pm line 45.
END failed--call queue aborted.
t/w......skipped: Why not?

Test Summary Report
-------------------
t/w.t (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
Files=1, Tests=0,  0 wallclock secs ( 0.01 usr  0.01 sys +  0.04 cusr
0.00 csys =  0.06 CPU)
Result: FAIL


===============

Reply via email to