Skip Menu |

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

Report information
The Basics
Id: 50427
Status: resolved
Priority: 0/
Queue: Test-Group

People
Owner: Nobody in particular
Requestors: NCLEATON [...] cpan.org
Cc:
AdminCc:

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



Subject: PATCH: fix failing test on some platforms
In t/10external.t, a script dies and the test asserts that the exit status should be 255. However, die() does not always exit with status 255 - if $! is set then it becomes the script's exit status. As perldoc perlvar states, other than just after a failed system call the value of $! is meaningless and could be anything. Thus it's not portable to expect a particular exit status when a script dies. The attached patch broadens the test to accept any non-zero exit status.
Subject: test-group.patch
diff -Nurd Test-Group-0.14.orig/t/10-external.t Test-Group-0.14/t/10-external.t --- Test-Group-0.14.orig/t/10-external.t 2008-09-12 18:05:23.000000000 +0200 +++ Test-Group-0.14/t/10-external.t 2009-10-11 21:28:32.000000000 +0200 @@ -155,7 +155,7 @@ not ok 3 - other group EOOUT -is $perl->run(stdin => <<'EOSCRIPT') >> 8, 255, "dont_catch_exceptions"; +ok $perl->run(stdin => <<'EOSCRIPT') >> 8, "dont_catch_exceptions"; use Test::More tests => 1; use Test::Group; Test::Group->dont_catch_exceptions();
patch applied