fix poor t/op/runlevel.t test
authorNorton Allen <allen@huarp.harvard.edu>
Fri, 5 Sep 1997 00:00:00 +0000 (00:00 +0000)
committerTim Bunce <Tim.Bunce@ig.co.uk>
Fri, 5 Sep 1997 00:00:00 +0000 (00:00 +0000)
This patch fixes the Can't "goto" outside block test. Before, the
test only hit the desired error if the system sort did a compare
where $a was 0, which is not guaranteed (and does not occur on at
least one system.) Now both arguments are tested.

Credited: Hugo van der Sanden <hv@crypt.compulink.co.uk>
Credited: Gurusamy Sarathy <gsar@engin.umich.edu>

p5p-msgid: 199709261458.KAA28611@dolores.harvard.edu

t/op/runlevel.t

index 2be2eec..6693a82 100755 (executable)
@@ -304,7 +304,7 @@ EXPECT
 0, 1, 2, 3
 ########
 sub foo {
-  goto bar if $a == 0;
+  goto bar if $a == 0 || $b == 0;
   $a <=> $b;
 }
 @a = (3, 2, 0, 1);