summaryrefslogtreecommitdiffstats
path: root/tests/frame.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-10-25 21:06:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-10-25 21:06:25 (GMT)
commit0d5336db012f45753abace489f18f0ca299c6961 (patch)
treeb1bf3280a9046df99226158978502eeb26f5b0a3 /tests/frame.test
parente97381a6d921de403516d5b761539a450f4af83c (diff)
parent1320b8a2a9c1269a345d44d673a7a35707fbbe9c (diff)
downloadtk-core-tip-626.zip
tk-core-tip-626.tar.gz
tk-core-tip-626.tar.bz2
Merge 9.0core-tip-626
Diffstat (limited to 'tests/frame.test')
-rw-r--r--tests/frame.test54
1 files changed, 27 insertions, 27 deletions
diff --git a/tests/frame.test b/tests/frame.test
index 74768e4..65bcb95 100644
--- a/tests/frame.test
+++ b/tests/frame.test
@@ -169,9 +169,9 @@ test frame-1.12 {frame configuration options} -setup {
frame .f
set opts {}
foreach opt [.f configure] {
- if {[llength $opt] == 5} {
- lappend opts [lindex $opt 0] [lindex $opt 4]
- }
+ if {[llength $opt] == 5} {
+ lappend opts [lindex $opt 0] [lindex $opt 4]
+ }
}
frame .g {*}$opts
} -cleanup {
@@ -213,7 +213,7 @@ test frame-1.19 {frame configuration options} -body {
lindex [.f configure -borderwidth] 4
} -cleanup {
.f configure -borderwidth [lindex [.f configure -borderwidth] 3]
-} -result 1
+} -result 1.3
test frame-1.20 {frame configuration options} -body {
.f configure -borderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
@@ -376,7 +376,7 @@ test frame-2.8 {toplevel configuration options} -constraints win -setup {
.t configure -use 0x44022
} -cleanup {
deleteWindows
-} -returnCodes error -result {window "0x44022" doesn't exist}
+} -returnCodes error -result {window "0x44022" does not exist}
test frame-2.9 {toplevel configuration options} -constraints win -setup {
deleteWindows
} -body {
@@ -476,9 +476,9 @@ test frame-2.19 {toplevel configuration options} -setup {
# Make sure all options can be set to the default value
toplevel .f
foreach opt [.f configure] {
- if {[llength $opt] == 5} {
- lappend opts [lindex $opt 0] [lindex $opt 4]
- }
+ if {[llength $opt] == 5} {
+ lappend opts [lindex $opt 0] [lindex $opt 4]
+ }
}
toplevel .g {*}$opts
} -cleanup {
@@ -514,7 +514,7 @@ test frame-2.25 {toplevel configuration options} -body {
test frame-2.26 {toplevel configuration options} -body {
.t configure -borderwidth 1.3
lindex [.t configure -borderwidth] 4
-} -result 1
+} -result 1.3
test frame-2.27 {toplevel configuration options} -body {
.t configure -borderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
@@ -1097,26 +1097,26 @@ test frame-12.2 {FrameWorldChanged procedure} -setup {
# Test all -labelanchor positions
set font {helvetica 12}
labelframe .f -highlightthickness 1 -bd 3 -padx 1 -pady 2 -font $font \
- -text "Mupp"
+ -text "Mupp"
set fh [expr {max([font metrics $font -linespace] + 2 - 3, 0)}]
set fw [expr {max([font measure $font "Mupp"] + 2 - 3, 0)}]
place .f -x 0 -y 0 -width 100 -height 100
pack [frame .f.f] -fill both -expand 1
set result {}
foreach lp {nw n ne en e es se s sw ws w wn} {
- .f configure -labelanchor $lp
- update
- set expx 5
- set expy 6
- set expw 90
- set exph 88
- switch -glob $lp {
- n* {incr expy $fh ; incr exph -$fh}
- s* {incr exph -$fh}
- w* {incr expx $fw ; incr expw -$fw}
- e* {incr expw -$fw}
- }
- lappend result [expr {
+ .f configure -labelanchor $lp
+ update
+ set expx 5
+ set expy 6
+ set expw 90
+ set exph 88
+ switch -glob $lp {
+ n* {incr expy $fh ; incr exph -$fh}
+ s* {incr exph -$fh}
+ w* {incr expx $fw ; incr expw -$fw}
+ e* {incr expw -$fw}
+ }
+ lappend result [expr {
[winfo x .f.f] == $expx && [winfo y .f.f] == $expy &&
[winfo width .f.f] == $expw && [winfo height .f.f] == $exph
}]
@@ -1248,7 +1248,7 @@ test frame-13.16 {labelframe configuration options} -body {
lindex [.f configure -borderwidth] 4
} -cleanup {
.f configure -borderwidth [lindex [.f configure -borderwidth] 3]
-} -result 1
+} -result 1.3
test frame-13.17 {labelframe configuration options} -body {
.f configure -borderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
@@ -1391,7 +1391,7 @@ test frame-14.1 {labelframe labelwidget option} -setup {
pack .f.f
update
list [winfo children .] [winfo width .f] \
- [expr {[winfo height .f] - [winfo height .l]}]
+ [expr {[winfo height .f] - [winfo height .l]}]
} -cleanup {
deleteWindows
} -result {{.f .l} 54 52}
@@ -1509,7 +1509,7 @@ test frame-15.2 {TIP 262: frame background images} -setup {
.f configure -backgroundimage gorp
} -returnCodes error -cleanup {
deleteWindows
-} -result {image "gorp" doesn't exist}
+} -result {image "gorp" does not exist}
test frame-15.3 {TIP 262: frame background images} -setup {
deleteWindows
image create photo gorp -width 10 -height 10
@@ -1689,7 +1689,7 @@ test frame-15.9 {TIP 262: toplevel background images} -setup {
.t configure -backgroundimage gorp
} -returnCodes error -cleanup {
deleteWindows
-} -result {image "gorp" doesn't exist}
+} -result {image "gorp" does not exist}
test frame-15.10 {TIP 262: toplevel background images} -setup {
deleteWindows
image create photo gorp -width 10 -height 10