Subject: | ok() does not increment correctly when forked |
ok() does not increment correctly when forked causing Test::Harness v3+
to fail
[root@mail2 t]# perl -MTest::Harness -e "runtests(test)"
test.... All 3 subtests passed
Test Summary Report
-------------------
test (Wstat: 0 Tests: 3 Failed: 0)
Parse errors: Tests out of sequence. Found (2) but expected (3)
Files=1, Tests=3, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.04 cusr
0.01 csys = 0.09 CPU)
Result: FAIL
Failed 1/1 test programs. 0/3 subtests failed.
[root@mail2 t]# perl test
1..3
# Running under perl version 5.008008 for linux
# Current time local: Fri May 23 04:51:47 2008
# Current time GMT: Fri May 23 09:51:47 2008
# Using Test.pm version 1.25
ok 1
ok 2
ok 2
[root@mail2 t]# cat test
use Test;
BEGIN { plan tests => 3 }
ok(1);
if (fork) {
ok(1);
} else {
ok(1);
}
[root@mail2 t]#