Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5561d4df28
Fetching contributors…

Cannot retrieve contributors at this time

executable file 45 lines (37 sloc) 0.899 kb
#!perl
# Copyright (C) 2004-2006, The Parrot Foundation.
# the following lines re-execute this as a tcl script
# the \ at the end of these lines makes them a comment in tcl \
use lib qw(lib); # \
use Tcl::Test; #\
__DATA__
source lib/test_more.tcl
plan 4
eval_is {
set result ""
for {set a 0} {$a < 10} {incr a} {
if {$a > 5} { continue }
set result [append result $a]
}
list $a $result
} {10 012345} {continue from for}
eval_is {
set result ""
set a 0
while {$a <= 10} {
incr a
if {$a < 5} { continue }
set result [append result $a]
}
list $a $result
} {11 567891011} {continue from while}
eval_is {
proc test {} {continue}
test
} {invoked "continue" outside of a loop} \
{continue outside of a loop}
eval_is {
proc test {} {continue}
for {set i 0} {$i < 5} {incr i} {test}
} {invoked "continue" outside of a loop} \
{continue in a proc called in a loop}
Jump to Line
Something went wrong with that request. Please try again.