summaryrefslogtreecommitdiffstats
path: root/tests/winfo.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-06-05 07:23:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-06-05 07:23:17 (GMT)
commitbdc95807199b5fb2ad244fbd2a595825cdee1fc1 (patch)
treee18f2274df06f9ee7e6d70c2d58b244fba0192c1 /tests/winfo.test
parent884c9570fffd13b20d87151fe979e3e09edd5ed8 (diff)
downloadtk-bdc95807199b5fb2ad244fbd2a595825cdee1fc1.zip
tk-bdc95807199b5fb2ad244fbd2a595825cdee1fc1.tar.gz
tk-bdc95807199b5fb2ad244fbd2a595825cdee1fc1.tar.bz2
Use single-argument "expr" as much as possible. Not complete yet, but most trivial places are done.
Diffstat (limited to 'tests/winfo.test')
-rw-r--r--tests/winfo.test14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/winfo.test b/tests/winfo.test
index 83aff71..49a92a6 100644
--- a/tests/winfo.test
+++ b/tests/winfo.test
@@ -27,9 +27,9 @@ proc eatColors {w {options ""}} {
pack $w.c
for {set y 0} {$y < 8} {incr y} {
for {set x 0} {$x < 40} {incr x} {
- set color [format #%02x%02x%02x [expr $x*6] [expr $y*30] 0]
- $w.c create rectangle [expr 10*$x] [expr 20*$y] \
- [expr 10*$x + 10] [expr 20*$y + 20] -outline {} \
+ set color [format #%02x%02x%02x [expr {$x*6}] [expr {$y*30}] 0]
+ $w.c create rectangle [expr {10*$x}] [expr {20*$y}] \
+ [expr {10*$x + 10}] [expr {20*$y + 20}] -outline {} \
-fill $color
}
}
@@ -156,7 +156,7 @@ test winfo-4.6 {"winfo containing" command} -constraints {
wm geom .t +0+0
update
- winfo containing [expr [winfo rootx .t.f]-1] [expr [winfo rooty .t.f]-1]
+ winfo containing [expr {[winfo rootx .t.f]-1}] [expr {[winfo rooty .t.f]-1}]
} -cleanup {
destroy .t
} -result .t
@@ -169,8 +169,8 @@ test winfo-4.7 {"winfo containing" command} -setup {
wm geom .t +0+0
update
- set x [winfo containing -display .t.f [expr [winfo rootx .t]+600] \
- [expr [winfo rooty .t.f]+450]]
+ set x [winfo containing -display .t.f [expr {[winfo rootx .t]+600}] \
+ [expr {[winfo rooty .t.f]+450}]]
expr {($x == ".") || ($x == "")}
} -cleanup {
destroy .t
@@ -364,7 +364,7 @@ test winfo-11.5 {"winfo visualid" command} -body {
} -result {3}
test winfo-11.6 {"winfo visualid" command} -body {
set x [lindex [lindex [winfo visualsa . includeids] 0] 2]
- expr $x + 2 - $x
+ expr {$x + 2 - $x}
} -result {2}