summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas König <a.koenig@mind.de>2003-08-15 13:37:29 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-15 08:44:42 +0000
commit21c74f43bb8a4eac1af459c973ca694bf54dde7b (patch)
treed7747b169053f93178560601c730f93ddb476c72
parentcd6c9654a756b46c141534899156b821350d92df (diff)
downloadperl-21c74f43bb8a4eac1af459c973ca694bf54dde7b.tar.gz
TEST script (Was: Not ok 20712ff)
Message-ID: <87wudf9s86.fsf_-_@franz.ak.mind.de> p4raw-id: //depot/perl@20721
-rwxr-xr-xt/TEST44
1 files changed, 28 insertions, 16 deletions
diff --git a/t/TEST b/t/TEST
index c42d10aade..ecd5122f35 100755
--- a/t/TEST
+++ b/t/TEST
@@ -300,35 +300,47 @@ EOT
$ok = 0;
$next = 0;
+ my $seen_leader = 0;
+ my $seen_ok = 0;
while (<RESULTS>) {
next if /^\s*$/; # skip blank lines
if ($verbose) {
print $_;
}
- unless (/^#/) {
+ unless (/^\#/) {
if (/^1\.\.([0-9]+)( todo ([\d ]+))?/) {
$max = $1;
%todo = map { $_ => 1 } split / /, $3 if $3;
$totmax += $max;
$files += 1;
- $next = 1;
- $ok = 1;
+ unless ($seen_ok) {
+ $next = 1;
+ $ok = 1;
+ }
+ $seen_leader = 1;
}
else {
- if (/^(not )?ok (\d+)[^#]*(\s*#.*)?/ &&
- $2 == $next)
- {
- my($not, $num, $extra) = ($1, $2, $3);
- my($istodo) = $extra =~ /^\s*#\s*TODO/ if $extra;
- $istodo = 1 if $todo{$num};
-
- if( $not && !$istodo ) {
- $ok = 0;
- $next = $num;
- last;
+ if (/^(not )?ok (\d+)[^\#]*(\s*\#.*)?/) {
+ unless ($seen_leader) {
+ unless ($seen_ok) {
+ $next = 1;
+ $ok = 1;
+ }
}
- else {
- $next = $next + 1;
+ $seen_ok = 1;
+ if ($2 == $next) {
+ my($not, $num, $extra) = ($1, $2, $3);
+ my($istodo) = $extra =~ /^\s*#\s*TODO/ if $extra;
+ $istodo = 1 if $todo{$num};
+
+ if( $not && !$istodo ) {
+ $ok = 0;
+ $next = $num;
+ last;
+ }
+ else {
+ $next = $next + 1;
+ }
}
}
elsif (/^Bail out!\s*(.*)/i) { # magic words