Skip Menu |

This queue is for tickets about the Test-Harness CPAN distribution.

Report information
The Basics
Id: 4988
Status: resolved
Priority: 0/
Queue: Test-Harness

People
Owner: andy [...] hexten.net
Requestors: kconnor [...] proofpoint.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.40
Fixed in: (no value)



Subject: test failed count/percentage is wrong when dying mid-test (test included)
I think the problem is in _dubious_return because it doesn't happen if the test does an exit(0) instead of exit(1) add this to test_harness.t %samples die_mid => { total => { bonus => 0, max => 2, 'ok' => 0, files => 1, bad => 1, good => 0, tests => 1, sub_skipped=> 0, 'todo' => 0, skipped => 0, }, failed => { max => 2, failed => 2, canon => '1-2', }, all_ok => 0, }, and create t/sample_tests/die_mid: print <<DUMMY_TEST; 1..2 not ok 1 DUMMY_TEST exit 1; # exit because die() can be noisy
the relevant output of the test: 1..9 ok 1 - use Test::Harness; ok 2 # skip special tests for bailout ok 3 ok 4 - die_mid - all ok ok 5 - die_mid - has total ok 6 - die_mid - totals not ok 7 - die_mid - failed # Failed test (t/test-harness.t at line 541) # Structures begin differing at: # $got->{failed} = '3' # $expected->{failed} = '2' ok 8 # skip special tests for bignum ok 9
Resolved in 2.99