Re: Extraneous whitespace on failures with T::Harness 0.48, T::More 0.60

2005-06-03 Thread James E Keenan

Nik Clayton wrote:

All,

There seems to have been a change in the output format for test 
failures semi-recently.


Given this test script:

#!/usr/bin/perl

use Test::Harness 0.48;
use Test::More 0.60;

plan tests => 2;

ok(1, 'test 1');
ok(0, 'test 2');

I get this output:

1..2
ok 1 - test 1
not ok 2 - test 2

# Failed test (test.pl at line 9)
# Looks like you failed 1 test of 2.

Notice the blank line between the "not ok 2" line and the first line of
diagnostic output.  That seems new.

I confirm your observation.  My installed Test::More is v0.47 and 
generates no extra linespace before # Failed.  Running the same script 
with v0.60 produces the extra linespace.


I don't know which version this crept in on or why.

jimk


Re: Devel::cover bug?

2005-06-03 Thread Paul Johnson
On Fri, Jun 03, 2005 at 06:56:50PM -0400, Christopher H. Laco wrote:

> As I recall [I may be wrong], some of your snippets were under 
> /5.8.0/... isn't < 5.8.2 considered squirrelly (technical term) under 
> Devel::Cover?

Yes, you're right, I do recommend a minimum version of 5.8.2.  It would
be interesting to see whether the problem remains in something more
recent.  I wonder too whether 64bits has anything to do with it.

> Perl 5.8.0 and 5.8.1 will give slightly different results to more recent 
> versions due to changes in the op tree.

Actually, the changes are between 5.8.0 and 5.8.1, but I notice the docs
are wrong there.  They wont be in the next release.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net


Re: Devel::cover bug?

2005-06-03 Thread Christopher H. Laco

Kevin Scaldeferri wrote:


On Jun 3, 2005, at 1:40 PM, Paul Johnson wrote:


Certainly.  Of course, it's always possible and quite likely that there
is a bug in my code somewhere.  But there is also a chance that I am
conflating two ops, since I have yet to come up with a way to uniquely
identify an op (suggestions welcome).  You're not running on 5.6.x are
you?




No, 5.8.x

-kevin




As I recall [I may be wrong], some of your snippets were under 
/5.8.0/... isn't < 5.8.2 considered squirrelly (technical term) under 
Devel::Cover?



Perl 5.8.0 and 5.8.1 will give slightly different results to more recent 
versions due to changes in the op tree.




-=Chris


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Devel::cover bug?

2005-06-03 Thread Kevin Scaldeferri


On Jun 3, 2005, at 1:40 PM, Paul Johnson wrote:


Certainly.  Of course, it's always possible and quite likely that there
is a bug in my code somewhere.  But there is also a chance that I am
conflating two ops, since I have yet to come up with a way to uniquely
identify an op (suggestions welcome).  You're not running on 5.6.x are
you?




No, 5.8.x

-kevin



Re: prove with Devel::Cover example?

2005-06-03 Thread Steve Peters
On Fri, Jun 03, 2005 at 06:44:53PM +, Mark Stosberg wrote:
> Ok, I'm feeling brain dead about this one-- this seems easy but I'm
> missing it. 
> 
> How can I use 'prove' and Devel::Cover together? I tried: 
> 
>  perl -MDevel::Cover prove ...
> 
> but didn't cover the scripts that ran.
> 
> Mark
> 

prove is just a cover over Test::Harness, so (if I remember correctly)

  HARNESS_PERL_SWITCHES=-MDevel::Cover prove ...

should work.

Steve Peters
[EMAIL PROTECTED]


Re: Devel::cover bug?

2005-06-03 Thread Paul Johnson
On Wed, Jun 01, 2005 at 03:00:03PM -0700, Kevin Scaldeferri wrote:

> On Jun 1, 2005, at 2:35 PM, James E Keenan wrote:
> 
> >Kevin Scaldeferri wrote:
> >>I'm looking at a bit of output from Devel::Cover that I imagine has 
> >>to be a bug.  I'll try my best to reproduce the HTML output:
> >>stmt   branch   cond   sub  time code
> >>221862  100  100  _1613639  next if 
> >>($line =~ /^\s*[#!]/ || $line =~ /^\s*$/);
> >
> >>If you look at the subroutine coverage page, it claims that there is 
> >>a BEGIN block uncovered at that line.
> >... nor have I seen an uncovered BEGIN block.  But that may just be a 
> >side effect of the sort of things I've been doing coverage analysis 
> >on.
> 
> Well, there is no BEGIN block there at all, so that suggests something 
> funny is going on.

Certainly.  Of course, it's always possible and quite likely that there
is a bug in my code somewhere.  But there is also a chance that I am
conflating two ops, since I have yet to come up with a way to uniquely
identify an op (suggestions welcome).  You're not running on 5.6.x are
you?

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net


Re: prove with Devel::Cover example?

2005-06-03 Thread Pete Krawczyk
Subject: prove with Devel::Cover example?
From: Mark Stosberg <[EMAIL PROTECTED]>
Date: Fri, 3 Jun 2005 18:44:53 + (UTC)

}How can I use 'prove' and Devel::Cover together? I tried: 

HARNESS_PERL_SWITCHES=-MDevel::Cover prove file.t

-Pete K
-- 
Pete Krawczyk
  perl at bsod dot net



prove with Devel::Cover example?

2005-06-03 Thread Mark Stosberg
Ok, I'm feeling brain dead about this one-- this seems easy but I'm
missing it. 

How can I use 'prove' and Devel::Cover together? I tried: 

 perl -MDevel::Cover prove ...

but didn't cover the scripts that ran.

Mark



Extraneous whitespace on failures with T::Harness 0.48, T::More 0.60

2005-06-03 Thread Clayton, Nik
All,

There seems to have been a change in the output format for test 
failures semi-recently.

Given this test script:

#!/usr/bin/perl

use Test::Harness 0.48;
use Test::More 0.60;

plan tests => 2;

ok(1, 'test 1');
ok(0, 'test 2');

I get this output:

1..2
ok 1 - test 1
not ok 2 - test 2

# Failed test (test.pl at line 9)
# Looks like you failed 1 test of 2.

Notice the blank line between the "not ok 2" line and the first line of
diagnostic output.  That seems new.

Is this a deliberate change?  I know that programs aren't supposed to pay
attention to lines that don't match ok/not ok, and normally that'd be fine.

However, most of my testing for libtap[1] is done by running Perl tests,
and then running equivalent tests written using libtap, and verifying that the
output (including diagnostic output) is the same.  So all my tests just
broke :-(

It's not difficult to change them all, I just want to make sure that this
change in format is now 'official' (or as official as it gets) and isn't
likely to be reverted in the future.

Cheers,

N

[1] Plug: http://jc.ngo.org.uk/trac-bin/trac.cgi/wiki