develooper Front page | perl.perl5.porters | Postings from November 2008

[perl #60866] Test::Harness message on single skip reason

Thread Previous
From:
Steve Peters via RT
Date:
November 26, 2008 15:07
Subject:
[perl #60866] Test::Harness message on single skip reason
Message ID:
rt-3.6.HEAD-2894-1227733840-1820.60866-15-0@perl.org
On Wed Nov 26 13:05:45 2008, stmpeters wrote:
> On Wed Nov 26 12:27:45 2008, kryde wrote:
> > In the debian perl 5.10.0 running
> >
> >     prove foo.t
> >
> > on the foo.t below prints
> >
> >     foo....ok
> >             1/1 skipped: various reasons
> >     All tests successful, 1 subtest skipped.
> >     Files=1, Tests=1,  0 wallclock secs ( 0.03 cusr +  0.02 csys =
> >    0.05 CPU)
> >
> > where I hoped the "skipped:" would say the "Insufficient pressure"
> > reason printed by foo.t, instead of "various reasons".
> >
> > Nosing around I suspect Test::Harness::test_handler() checks
> > Test::Harness::Results::skip_reason() is undef before storing the
> >    first
> > ever reason in there with set_skip_reason().  But skip_reason()
> seems
> >    to
> > return 0 when never set, not undef.  (0 is no doubt good for the
> >    numeric
> > field accessors there but perhaps not for a string.)
> >
> >
> 
> Unfortunately, without seeing the test code involved, I really can't
> confirm what the problem
> you are seeing is.  Also, the version of Test::Harness you are using
> would be help in seeing if
> this problem was already fixed or not.
> 
> Steve Peters

OK, now I see the test code.  Try `prove -v` if you want to see the verbose output containing 
all the skip reasons.

[steve@kirk ~]$ /usr/bin/prove foo.t 
foo....ok                                                                    
        1/1 skipped: various reasons
All tests successful, 1 subtest skipped.
Files=1, Tests=1,  0 wallclock secs ( 0.00 cusr +  0.00 csys =  0.00 CPU)
[steve@kirk ~]$ /usr/bin/prove -v foo.t 
foo....1..1
ok 1 # skip Insufficient flogiston pressure.
ok
        1/1 skipped: various reasons
All tests successful, 1 subtest skipped.
Files=1, Tests=1,  0 wallclock secs ( 0.00 cusr +  0.01 csys =  0.01 CPU)


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About