On Thu, Apr 20, 2006 at 10:36:08PM +0200, demerphq wrote:
> On 4/20/06, Steve Peters <[EMAIL PROTECTED]> wrote:
> > 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?
> 
> Attached patch should fix it up. Both in terms of making it clearer
> and of fixing the list. So your test file would look like:
> 
> All tests successful (1 subtest UNEXPECTEDLY SUCCEEDED), 37 subtests skipped.
> Passed Todo  Stat Wstat Todos Pass  Passed  List of Passed
> -------------------------------------------------------------------------------
> t/demerphq.t                2    1  50.00%  3
> Files=19, Tests=572,  8 wallclock secs ( 0.00 cusr +  0.00 csys =  0.00 CPU)
> 
> Hopefully thats clearer. The "Todos" column shows how many todos there
> are in the file.
> 

Excellent!  It seems to be working more as I was hoping to see.  This
patch was applied as change #27925.

Steve Peters
[EMAIL PROTECTED]

Attachment: signature.asc
Description: Digital signature

Reply via email to