From: Nicholas Clark Date: Tue, 14 Dec 2010 16:58:10 +0000 (+0000) Subject: Add $Tests_Are_Passing to test.pl, analogous to Test::Builder's is_passing(). X-Git-Tag: v5.13.8~86 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/02455492c4700a29a5d3066a182496a7efc547f3 Add $Tests_Are_Passing to test.pl, analogous to Test::Builder's is_passing(). --- diff --git a/t/test.pl b/t/test.pl index a558820..5f8eb98 100644 --- a/t/test.pl +++ b/t/test.pl @@ -26,6 +26,7 @@ my $Perl; # Safer version of $^X set by which_perl() $TODO = 0; $NO_ENDING = 0; +$Tests_Are_Passing = 1; # Use this instead of print to avoid interference while testing globals. sub _print { @@ -122,7 +123,12 @@ sub _ok { $out = $pass ? "ok $test" : "not ok $test"; } - $out = $out . " # TODO $TODO" if $TODO; + if ($TODO) { + $out = $out . " # TODO $TODO"; + } else { + $Tests_Are_Passing = 0 unless $pass; + } + _print "$out\n"; unless ($pass) {