Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix exit codes for Test.pm
  • Loading branch information
hoelzro committed Jul 28, 2014
1 parent bc4e880 commit e53ddfc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/Test.pm
Expand Up @@ -438,7 +438,16 @@ END {
if !$done_testing_has_been_run && !$no_plan {
done;
}
exit($num_of_tests_failed);

if $num_of_tests_failed > 0 {
exit($num_of_tests_failed min 254);
}
elsif !$no_plan && $num_of_tests_planned != $num_of_tests_run {
exit(255);
}
else {
exit(0);
}
}

=begin pod
Expand Down

0 comments on commit e53ddfc

Please sign in to comment.