diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-10-30 14:05:26 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-10-30 14:05:26 (GMT) |
commit | 3b0ee42270085b039b75e2e27a3a145399a1bfac (patch) | |
tree | b40e3e40b492e3eb8829c728d2eae884483143fe /tests/for-old.test | |
parent | 8f3e8012b1ad2c0f87eeba801b88e438b85143af (diff) | |
parent | f163c24b4c9dd8b0e7c72274f1c008384ea8f514 (diff) | |
download | tcl-3b0ee42270085b039b75e2e27a3a145399a1bfac.zip tcl-3b0ee42270085b039b75e2e27a3a145399a1bfac.tar.gz tcl-3b0ee42270085b039b75e2e27a3a145399a1bfac.tar.bz2 |
Merge 8.6
Diffstat (limited to 'tests/for-old.test')
-rw-r--r-- | tests/for-old.test | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/for-old.test b/tests/for-old.test index d68f05a..baf40fa 100644 --- a/tests/for-old.test +++ b/tests/for-old.test @@ -22,14 +22,14 @@ 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}]} { + for {set i 1} {$i<6} {incr i} { if {$i==4} continue set a [concat $a $i] } @@ -37,7 +37,7 @@ test for-old-1.2 {for tests} { } {1 2 3 5} test for-old-1.3 {for tests} { set a {} - for {set i 1} {$i<6} {set i [expr {$i+1}]} { + for {set i 1} {$i<6} {incr i} { if {$i==4} break set a [concat $a $i] } @@ -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 |