From: Yitzchak Scott-Thoennes Date: Mon, 4 Dec 2000 22:21:59 +0000 (-0800) Subject: [ID 20001203.001] Not OK: perl v5.7.0 +DEVEL7965 on os2-64int-ld 2.30 (UNINSTALLED) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e11947490c2e87179a2e8ad633598bddc45928c9;p=p5sagit%2Fp5-mst-13.2.git [ID 20001203.001] Not OK: perl v5.7.0 +DEVEL7965 on os2-64int-ld 2.30 (UNINSTALLED) Message-ID: Harness shouldn't ignore responses like "ok 3\r\r\n". p4raw-id: //depot/perl@7989 --- diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm index 36b5fa8..a3c1753 100644 --- a/lib/Test/Harness.pm +++ b/lib/Test/Harness.pm @@ -11,7 +11,7 @@ our($VERSION, $verbose, $switches, $have_devel_corestack, $curtest, $columns, @ISA, @EXPORT, @EXPORT_OK); $have_devel_corestack = 0; -$VERSION = "1.1604"; +$VERSION = "1.1605"; $ENV{HARNESS_ACTIVE} = 1; @@ -121,7 +121,7 @@ sub runtests { $ok++; $totok++; } - } elsif (/^ok\s*(\d*)(\s*\#\s*[Ss]kip\S*(?:(?>\s+)(.+))?)?/) { + } elsif (/^ok\s*(\d*)(\s*\#\s*[Ss]kip\S*(?:(?>\s+)(.+))?)?$/) { $this = $1 if $1 > 0; print "${ml}ok $this/$max" if $ml; $ok++; @@ -138,6 +138,10 @@ sub runtests { $skip_reason = $reason; } $bonus++, $totbonus++ if $todo{$this}; + } else { + # an ok or not ok not matching the 2 cases above... + # just ignore it for compatibility with TEST + next; } if ($this > $next) { # print "Test output counter mismatch [test $this]\n"; @@ -468,12 +472,14 @@ script(s). The default value is C<-w>. If the standard output line contains substring C< # Skip> (with variations in spacing and case) after C or C, it is -counted as a skipped test. If the whole testscript succeeds, the -count of skipped tests is included in the generated output. - -C reports the text after C< # Skip(whatever)> as a -reason for skipping. Similarly, one can include a similar explanation -in a C<1..0> line emitted if the test is skipped completely: +counted as a skipped test. In no other circumstance is anything +allowed to follow C or C. If the whole testscript +succeeds, the count of skipped tests is included in the generated +output. + +C reports the text after C< # Skip\S*\s+> as a reason +for skipping. Similarly, one can include a similar explanation in a +C<1..0> line emitted if the test is skipped completely: 1..0 # Skipped: no leverage found