summaryrefslogtreecommitdiffstats
path: root/tests/for-old.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/for-old.test')
-rw-r--r--tests/for-old.test18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/for-old.test b/tests/for-old.test
index d00a4ee..f5d1de9 100644
--- a/tests/for-old.test
+++ b/tests/for-old.test
@@ -6,8 +6,8 @@
# into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1996 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -22,23 +22,23 @@ if {"::tcltest" ni [namespace children]} {
catch {unset a i}
test for-old-1.1 {for tests} {
set a {}
- for {set i 1} {$i<6} {set i [expr $i+1]} {
+ for {set i 1} {$i<6} {incr i} {
set a [concat $a $i]
}
set a
} {1 2 3 4 5}
test for-old-1.2 {for tests} {
set a {}
- for {set i 1} {$i<6} {set i [expr $i+1]} {
- if $i==4 continue
+ for {set i 1} {$i<6} {incr i} {
+ if {$i==4} continue
set a [concat $a $i]
}
set a
} {1 2 3 5}
test for-old-1.3 {for tests} {
set a {}
- for {set i 1} {$i<6} {set i [expr $i+1]} {
- if $i==4 break
+ for {set i 1} {$i<6} {incr i} {
+ if {$i==4} break
set a [concat $a $i]
}
set a
@@ -55,12 +55,12 @@ test for-old-1.7 {for tests} {
} {wrong # args: should be "for start test next command"}
test for-old-1.8 {for tests} {
set a {xyz}
- for {set i 1} {$i<6} {set i [expr $i+1]} {}
+ for {set i 1} {$i<6} {incr i} {}
set a
} xyz
test for-old-1.9 {for tests} {
set a {}
- for {set i 1} {$i<6} {set i [expr $i+1]; if $i==4 break} {
+ for {set i 1} {$i<6} {incr i; if {$i==4} break} {
set a [concat $a $i]
}
set a