Skip Menu |

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

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

People
Owner: andy [...] hexten.net
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Out of order tests allowed to pass.
Test::Harness allows the following to pass with only a warning. 1..3 ok 3 ok 2 ok 2 $ perl -MTest::Harness -wle 'runtests @ARGV' ~/tmp/foo.t /Users/schwern/tmp/foo....ok 1/3Confused test output: test 2 answered after test 3 /Users/schwern/tmp/foo....ok All tests successful. It also allows things like 1..3 ok 1 ok 1 ok 2 $ perl -MTest::Harness -wle 'runtests @ARGV' ~/tmp/foo.t /Users/schwern/tmp/foo....ok 1/3Test output counter mismatch [test 3] /Users/schwern/tmp/foo....ok All tests successful. And this: $ perl -MTest::Harness -wle 'runtests @ARGV' ~/tmp/foo.t /Users/schwern/tmp/foo....ok 1/3Confused test output: test 2 answered after test 2 /Users/schwern/tmp/foo....ok All tests successful.
q...... All 3 subtests passed Test Summary Report ------------------- q.t (Wstat: 0 Tests: 3 Failed: 0) Parse errors: Tests out of sequence. Found (3) but expected (1) Tests out of sequence. Found (2) but expected (3) Files=1, Tests=3, 0 wallclock secs ( 0.01 usr + 0.01 sys = 0.02 CPU) Result: FAIL