Imported Tk 8.6.9
This commit is contained in:
@@ -61,4 +61,13 @@ test checkbutton-1.7 "Button destroyed by click" -body {
|
||||
update ; # shall not trigger error invalid command name ".top.b"
|
||||
} -result {}
|
||||
|
||||
# Bug [fa8de77936]
|
||||
test checkbutton-1.8 "Empty -variable" -body {
|
||||
# shall simply not crash
|
||||
ttk::checkbutton .cbev -variable {}
|
||||
.cbev invoke
|
||||
} -cleanup {
|
||||
destroy .cbev
|
||||
} -result {}
|
||||
|
||||
tcltest::cleanupTests
|
||||
|
||||
@@ -21,5 +21,8 @@ test layout-1.1 "Size computations for mixed-orientation layouts" -body {
|
||||
|
||||
} -cleanup { destroy .b } -result [list 24 24]
|
||||
|
||||
test layout-2 "Empty -children not allowed" -body {
|
||||
ttk::style layout Test.Tentry {Entry.field -children {}}
|
||||
} -returnCodes error -result {Invalid -children value}
|
||||
|
||||
tcltest::cleanupTests
|
||||
|
||||
@@ -65,5 +65,28 @@ test scale-1.0 "Self-destruction" -body {
|
||||
.s set 1 ; update
|
||||
} -returnCodes 1 -match glob -result "*"
|
||||
|
||||
test scale-2.1 "-state option" -setup {
|
||||
ttk::scale .s
|
||||
set res ""
|
||||
} -body {
|
||||
# defaults
|
||||
lappend res [.s instate disabled] [.s cget -state]
|
||||
# set -state: instate returns accordingly
|
||||
.s configure -state disabled
|
||||
lappend res [.s instate disabled] [.s cget -state]
|
||||
# back to normal
|
||||
.s configure -state normal
|
||||
lappend res [.s instate disabled] [.s cget -state]
|
||||
# use state command: -state does NOT reflect it
|
||||
.s state disabled
|
||||
lappend res [.s instate disabled] [.s cget -state]
|
||||
# further use state command
|
||||
.s state readonly
|
||||
lappend res [.s state] [.s cget -state]
|
||||
} -cleanup {
|
||||
destroy .s
|
||||
unset -nocomplain res
|
||||
} -result {0 normal 1 disabled 0 normal 1 normal {disabled readonly} normal}
|
||||
|
||||
tcltest::cleanupTests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user