On 4/20/06, Steve Peters <[EMAIL PROTECTED]> wrote:
> 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.

I think thats probably true.

>  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?

I have to admit im flummoxed on this one. The first number '2' is the
number of tests in the file. The next number '1' is the number of
problematic results. The %50.00 shows the percentage that are
problematic. So everything checks out up till there. But then the list
of failures is wrong. Which I dont get at all.

I had a look at the results when i did the patch i definately didnt
see this result. So far i dont see the cause, but i do see a subtle
bug that I hadnt noticed before.

The line that says:

   failed  => $test{bonus},

should probably read

   failed => scalar @{$test{todo_pass}}

But i still dont see why the list is wrong. Ill have to investigate
further later.

Cheers,
Yves






--
perl -Mre=debug -e "/just|another|perl|hacker/"

Reply via email to