Hi all!
On 2/15/07, Shlomi Fish <[EMAIL PROTECTED]> wrote:
Hi!
Test::Run works fine with TAPx-Parser 0.41, but it breaks with the
TAPx-Parser from the trunk:
Replying to myself I'd like to note that from my analysis at least the
bignum test failed because of the following code in the new
TAPx::Parser:
<<<<<<<<<
sub is_ok {
my $self = shift;
return if $self->is_unplanned; # <-----------
# TODO directives reverse the sense of a test.
return $self->has_todo ? 1 : $self->ok !~ /not/;
}
Since the test is reported as unlpanned, then it always returns false,
regardless of the true verdict. And I don't see a way to get the
second condition evaluation (which is what I need) without duplicating
its logic.
In TAPx::Parser 0.41 we have:
<<<<<<
sub is_ok {
my $self = shift;
# TODO directives reverse the sense of a test.
return $self->has_todo ? 1 : $self->ok !~ /not/;
}
So this is apparently what broke Test::Run.
Regards,
Shlomi Fish
<<<<<<<<<<<
shlomif:$trunk/modules/Test-Shlomif-Harness$ perl -Ilib t/test-harness.t
1..182
ok 1
ok 2 # skip don't apply to a bailout
ok 3 # skip don't apply to a bailout
ok 4 # skip don't apply to a bailout
ok 5 # skip don't apply to a bailout
ok 6 # skip don't apply to a bailout
ok 7 - bailout - No warnings
ok 8 # skip special tests for bailout
ok 9
ok 10 - bignum - all ok
ok 11 - bignum - has total
not ok 12 - bignum - totals
# Failed test (t/test-harness.t at line 522)
# Structures begin differing at:
# $got->{ok} = '2'
# $expected->{ok} = '4'
ok 13 - bignum - failed
ok 14 - bignum - Got proper warnings
ok 15 # skip special tests for bailout
not ok 16
# Failed test (t/test-harness.t at line 518)
# got: 'Assert failed! at lib/Test/Run/Straps.pm line 333
# '
# expected: ''
.
.
.
>>>>>>>>>>>
While:
<<<<<<<<<
shlomif:$trunk/modules/Test-Shlomif-Harness$ prove -I lib -I
~/progs/perl/cpan/Test/TAPx-Parser/TAPx-Parser-0.41/lib/
t/test-harness.t
t/test-harness....ok
30/182 skipped: various reasons
All tests successful, 30 subtests skipped.
Files=1, Tests=182, 3 wallclock secs ( 2.54 cusr + 0.57 csys = 3.11 CPU)
>>>>>>>>>
I'll try to investigate further. In the meanwhile you can see what I'm
doing by svn checkout'ing this:
https://svn.berlios.de/svnroot/repos/web-cpan/Test-Harness-NG/trunk/
Regards,
Shlomi Fish
--
------------------------------------------
Shlomi Fish http://www.shlomifish.org/
If his programming is anything like his philosophising, he
would find 10 imaginary bugs in the "Hello World" program.
--
------------------------------------------
Shlomi Fish http://www.shlomifish.org/
If his programming is anything like his philosophising, he
would find 10 imaginary bugs in the "Hello World" program.