summaryrefslogtreecommitdiffstats
path: root/tests/while-old.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2020-11-01 14:25:49 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2020-11-01 14:25:49 (GMT)
commitb7efdfe9bc03114b633073ed9d4423e4f88582c5 (patch)
treedef8a718bfc5e1ea62892acbdad2afda27b07a3b /tests/while-old.test
parent63855497af431a6ee84d67b62ade8694485d76c9 (diff)
parent3b0ee42270085b039b75e2e27a3a145399a1bfac (diff)
downloadtcl-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.test8
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}