On Wed, Apr 19, 2006 at 07:22:33AM +0200, demerphq wrote:
> On 4/19/06, Andy Lester <[EMAIL PROTECTED]> wrote:
> > > BTW, the patch only shows TODO pass status when no failures occur.
> > >
> > > Oh and obviously all of Test::Harness'es tests pass. :-)
> >
> > This patch doesn't apply against my latest dev version of
> > Test::Harness.  I'm going to have to massage it manually.
> >
> > But I like the idea.  Thanks.
> 
> You're welcome. If it helps It was against Test-Harness-2.56.
> 

Maybe I'm thinking too hard, or maybe the results reported aren't
exactly as clear as they probably should be.  Here's an example test and
its results as reported by Test::Harness with the TODO changes.

#!perl -w

use strict;
use Test::More qw(no_plan);

TODO: {
    local $TODO = "TODO testing";
    is(1, 2, "A failing test");
    is(1, 1, "A passing test");
}
[EMAIL PROTECTED]:~/smoke/perl-current/t$ ./perl harness th_test.t
th_test....ok
        1/2 unexpectedly succeeded
TODO PASSED tests 1-2

All tests successful (1 subtest UNEXPECTEDLY SUCCEEDED).
Passed Test Stat Wstat Total Pass  Passed  List of Passed
-------------------------------------------------------------------------------
th_test.t                  2    1  50.00%  1-2
Files=1, Tests=2,  0 wallclock secs ( 0.11 cusr +  0.01 csys =  0.12
CPU)

The line starting TODO PASSED shows all TODO tests, not those that
unexpectedly succeeded, which confused me a bit.  Also, the final
results show that one test passed, but then the list of passed is "1-2"
instead of just "2" which is the unexpected success.  Is there a way to
have the list of passed just show the unexpected successes?

Steve Peters
[EMAIL PROTECTED] 

Attachment: signature.asc
Description: Digital signature

Reply via email to