summaryrefslogtreecommitdiff
path: root/lib/Test
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@efn.org>2000-12-04 14:21:59 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-05 14:21:27 +0000
commite11947490c2e87179a2e8ad633598bddc45928c9 (patch)
tree6065204c04804f8f12636eb38023f13d2a7af890 /lib/Test
parentd731b4819e3a17fb0454058c8df4908132dab0c1 (diff)
downloadperl-e11947490c2e87179a2e8ad633598bddc45928c9.tar.gz
[ID 20001203.001] Not OK: perl v5.7.0 +DEVEL7965 on os2-64int-ld 2.30 (UNINSTALLED)
Message-ID: <HmIL6gzkgepS092yn@efn.org> Harness shouldn't ignore responses like "ok 3\r\r\n". p4raw-id: //depot/perl@7989
Diffstat (limited to 'lib/Test')
-rw-r--r--lib/Test/Harness.pm22
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm
index 36b5fa8a2d..a3c1753c3e 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<ok> or C<ok NUMBER>, it is
-counted as a skipped test. If the whole testscript succeeds, the
-count of skipped tests is included in the generated output.
-
-C<Test::Harness> 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<ok> or C<ok NUMBER>. If the whole testscript
+succeeds, the count of skipped tests is included in the generated
+output.
+
+C<Test::Harness> 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