List Info

Thread: Test::More bug?




Test::More bug?
user name
2007-09-17 12:04:23
I getting the following test failure in blead:

lib/CPANPLUS/t/40_CPANPLUS-Internals-Report.................
..Integer
overflow in version at
/cygdrive/c/perl_tmp/31887/perl-current/t/../lib/version.pm
line 19.
# Looks like your test died just after 60.
ok

The trouble is that there are over 120 tests.  If the test
file dies
after 60, how is it also reporting 'ok'.

The test file uses:   use Test::More                 
'no_plan';

It doesn't use eval anywhere that I can see.

Is this a bug in Test::More, et al?

Re: Test::More bug?
user name
2007-09-17 12:42:02
On Monday 17 September 2007 10:04:23 Jerry D. Hedden wrote:

> The trouble is that there are over 120 tests.  If the
test file dies
> after 60, how is it also reporting 'ok'.
>
> The test file uses:   use Test::More                
 'no_plan';

Without a specific number of tests in the test plan, how is
Test::More to know 
that there should be 120 tests?

-- c

Re: Test::More bug?
user name
2007-09-17 13:08:24
On 9/17/07, chromatic <chromaticwgz.org> wrote:
> On Monday 17 September 2007 10:04:23 Jerry D. Hedden
wrote:
>
> > The trouble is that there are over 120 tests. If
the test file dies
> > after 60, how is it also reporting 'ok'.
> >
> > The test file uses: use Test::More 'no_plan';
>
> Without a specific number of tests in the test plan,
how is Test::More to know
> that there should be 120 tests?

I agree that it wouldn't know there are 120+ tests. 
However,
is it correct that it should report 'ok' if it also detects
that it died?
    # Looks like your test died just after 60.
Isn't that supposed to be a failure?

Re: Test::More bug?
user name
2007-09-17 13:10:52
On 9/17/07, Jerry D. Hedden <jdheddencpan.org> wrote:
> On 9/17/07, chromatic <chromaticwgz.org> wrote:
> > On Monday 17 September 2007 10:04:23 Jerry D.
Hedden wrote:
> >
> > > The trouble is that there are over 120 tests.
If the test file dies
> > > after 60, how is it also reporting 'ok'.
> > >
> > > The test file uses: use Test::More
'no_plan';
> >
> > Without a specific number of tests in the test
plan, how is Test::More to know
> > that there should be 120 tests?
>
> I agree that it wouldn't know there are 120+ tests. 
However,
> is it correct that it should report 'ok' if it also
detects that it died?
>     # Looks like your test died just after 60.
> Isn't that supposed to be a failure?

Or maybe this is Test::Harness problem?  (Sorry to be
exposing my ignorance.)

t/TEST doesn't check exit (was Re: Test::More bug?)
user name
2007-09-18 20:25:14
Jerry D. Hedden wrote:
> On 9/17/07, Jerry D. Hedden <jdheddencpan.org> wrote:
>> On 9/17/07, chromatic <chromaticwgz.org> wrote:
>>> On Monday 17 September 2007 10:04:23 Jerry D.
Hedden wrote:
>>>
>>>> The trouble is that there are over 120
tests. If the test file dies
>>>> after 60, how is it also reporting 'ok'.
>>>>
>>>> The test file uses: use Test::More
'no_plan';
>>> Without a specific number of tests in the test
plan, how is Test::More to know
>>> that there should be 120 tests?
>> I agree that it wouldn't know there are 120+ tests.
 However,
>> is it correct that it should report 'ok' if it also
detects that it died?
>>     # Looks like your test died just after 60.
>> Isn't that supposed to be a failure?
> 
> Or maybe this is Test::Harness problem?  (Sorry to be
exposing my ignorance.)

This is a problem in t/TEST which is what "make
test" uses rather than the
full harness.  It does not check the exit codes of
processes.  Any non-zero
exit, regardless of the test's output, should be a failure.

Patch attached.


-- 
Whip me, beat me, make my code compatible with VMS!

  
Re: t/TEST doesn't check exit (was Re: Test::More bug?)
user name
2007-09-19 02:57:28
On 19/09/2007, Michael G Schwern <schwernpobox.com> wrote:
> This is a problem in t/TEST which is what "make
test" uses rather than the
> full harness.  It does not check the exit codes of
processes.  Any non-zero
> exit, regardless of the test's output, should be a
failure.
>
> Patch attached.

Thanks, applied.

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )