diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2020-11-01 14:25:49 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2020-11-01 14:25:49 (GMT) |
commit | b7efdfe9bc03114b633073ed9d4423e4f88582c5 (patch) | |
tree | def8a718bfc5e1ea62892acbdad2afda27b07a3b /tests/while-old.test | |
parent | 63855497af431a6ee84d67b62ade8694485d76c9 (diff) | |
parent | 3b0ee42270085b039b75e2e27a3a145399a1bfac (diff) | |
download | tcl-b7efdfe9bc03114b633073ed9d4423e4f88582c5.zip tcl-b7efdfe9bc03114b633073ed9d4423e4f88582c5.tar.gz tcl-b7efdfe9bc03114b633073ed9d4423e4f88582c5.tar.bz2 |
Merge 8.7
Diffstat (limited to 'tests/while-old.test')
-rw-r--r-- | tests/while-old.test | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/while-old.test b/tests/while-old.test index eddc025..f5315fb 100644 --- a/tests/while-old.test +++ b/tests/while-old.test @@ -20,7 +20,7 @@ if {"::tcltest" ni [namespace children]} { test while-old-1.1 {basic while loops} { set count 0 - while {$count < 10} {set count [expr $count+1]} + while {$count < 10} {set count [expr {$count + 1}]} set count } 10 test while-old-1.2 {basic while loops} { @@ -58,9 +58,9 @@ test while-old-2.1 {continue in while loop} { set index 0 set result {} while {$index < 5} { - if {$index == 2} {set index [expr $index+1]; continue} + if {$index == 2} {set index [expr {$index + 1}]; continue} set result [concat $result [lindex $list $index]] - set index [expr $index+1] + set index [expr {$index + 1}] } set result } {1 2 4 5} @@ -72,7 +72,7 @@ test while-old-3.1 {break in while loop} { while {$index < 5} { if {$index == 3} break set result [concat $result [lindex $list $index]] - set index [expr $index+1] + set index [expr {$index + 1}] } set result } {1 2 3} |