in reply to Re: Test::Harness bug ? ... or author idiocy ?
in thread Test::Harness bug ? ... or author idiocy ?
I first run perl try.pl to compile the script, and then I run:use strict; use warnings; use Inline C => <<'EOC'; SV * foo( SV * in ) { /* printf("# %s\n", SvPV_nolen(in)); */ return newSVpv(SvPV_nolen(in), 0); } EOC my $ok = 1; print "1..1\n"; for(1 .. 1000) { my $n = int(rand(10000000)); $ok = 0 if foo("$n") ne "$n"; } if($ok) { print "ok 1\n" } else { print "not ok 1\n"; } __END__
As you can see, everything is fine. But if I then include the printf() statement and run perl try.pl (to recompile the script), upon re-testing I get:$ perl -MTAP::Harness -e '$h = TAP::Harness->new(); $h->runtests("./tr +y.pl");' ./try.pl .. ok All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.06 cusr + 0.01 csys = 0.12 CPU) Result: PASS
Cheers,$ perl -MTAP::Harness -e '$h = TAP::Harness->new(); $h->runtests("./t +ry.pl");' ./try.pl .. All 1 subtests passed Test Summary Report ------------------- ./try.pl (Wstat: 0 Tests: 1 Failed: 0) Parse errors: No plan found in TAP output Files=1, Tests=1, 1 wallclock secs ( 0.11 usr 0.01 sys + 0.05 cusr + 0.02 csys = 0.19 CPU) Result: FAIL
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Test::Harness bug ? ... or author idiocy ?
by hippo (Archbishop) on Nov 06, 2021 at 12:04 UTC | |
by syphilis (Archbishop) on Nov 06, 2021 at 12:57 UTC | |
by hippo (Archbishop) on Nov 06, 2021 at 13:53 UTC | |
by syphilis (Archbishop) on Nov 06, 2021 at 23:25 UTC | |
|
Re^3: Test::Harness bug ? ... or author idiocy ?
by Anonymous Monk on Nov 06, 2021 at 07:19 UTC | |
by syphilis (Archbishop) on Nov 06, 2021 at 10:20 UTC |