Go on record about the binary backward incompatibility.
[p5sagit/p5-mst-13.2.git] / t / cmd / while.t
index 46bbdea..226db47 100755 (executable)
@@ -1,6 +1,6 @@
 #!./perl
 
-print "1..19\n";
+print "1..22\n";
 
 open (tmp,'>Cmd_while.tmp') || die "Can't create Cmd_while.tmp.";
 print tmp "tvi925\n";
@@ -8,7 +8,7 @@ print tmp "tvi920\n";
 print tmp "vt100\n";
 print tmp "Amiga\n";
 print tmp "paper\n";
-close tmp;
+close tmp or die "Could not close: $!";
 
 # test "last" command
 
@@ -160,3 +160,20 @@ print "ok $i\n";
         print "ok $l\n"
     }
 }
+
+$i = 20;
+{
+    while (1) {
+       my $x;
+       print $x if defined $x;
+       $x = "not ";
+       print "ok $i\n"; ++$i;
+       if ($i == 21) {
+           next;
+       }
+       last;
+    }
+    continue {
+        print "ok $i\n"; ++$i;
+    }
+}