summaryrefslogtreecommitdiffstats
path: root/tests/button.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/button.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/button.test')
-rw-r--r--tests/button.test8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/button.test b/tests/button.test
index b953197..e5cb1b9 100644
--- a/tests/button.test
+++ b/tests/button.test
@@ -3444,12 +3444,12 @@ test button-5.24 {ConfigureButton - computing geometry} -constraints {
set expectedwidth [expr {$textwidth + 2*[.b cget -borderwidth] \
+ 2*[.b cget -highlightthickness] + 2*[.b cget -padx]}]
incr expectedwidth 2 ; # added (hardcoded) in tkUnixButton.c
- set result [expr $expectedwidth == [winfo reqwidth .b]]
+ set result [expr {$expectedwidth == [winfo reqwidth .b]}]
set linespace [lindex [font metrics [.b cget -font] -displayof .b] 5]
set expectedheight [expr {$linespace + 2*[.b cget -borderwidth] \
+ 2*[.b cget -highlightthickness] + 2*[.b cget -pady]}]
incr expectedheight 2 ; # added (hardcoded) in tkUnixButton.c
- lappend result [expr $expectedheight == [winfo reqheight .b]]
+ lappend result [expr {$expectedheight == [winfo reqheight .b]}]
# 2. button with a bitmap image
# there is no access to characteristics the predefined bitmaps,
# so define one as an image (copied from questhead.xbm)
@@ -3468,11 +3468,11 @@ test button-5.24 {ConfigureButton - computing geometry} -constraints {
set expectedwidth [expr {[image width $myquesthead] + 2*[.b cget -borderwidth] \
+ 2*[.b cget -highlightthickness]}]
incr expectedwidth 2 ; # added (hardcoded) in tkUnixButton.c
- lappend result [expr $expectedwidth == [winfo reqwidth .b]]
+ lappend result [expr {$expectedwidth == [winfo reqwidth .b]}]
set expectedheight [expr {[image height $myquesthead] + 2*[.b cget -borderwidth] \
+ 2*[.b cget -highlightthickness]}]
incr expectedheight 2 ; # added (hardcoded) in tkUnixButton.c
- lappend result [expr $expectedheight == [winfo reqheight .b]]
+ lappend result [expr {$expectedheight == [winfo reqheight .b]}]
} -cleanup {
destroy .b
} -result {1 1 1 1}