diff options
Diffstat (limited to 'tests/ttk/spinbox.test')
-rw-r--r-- | tests/ttk/spinbox.test | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/tests/ttk/spinbox.test b/tests/ttk/spinbox.test index 7c6b011..1f32049 100644 --- a/tests/ttk/spinbox.test +++ b/tests/ttk/spinbox.test @@ -2,7 +2,7 @@ # ttk::spinbox widget tests # -package require Tk +package require tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands @@ -291,15 +291,22 @@ test spinbox-11.2 {Bugs [2a32225cd1] and [9fa3e08243]} -setup { destroy .s pack [ttk::spinbox .s] update + set res {} } -body { .s insert end "A sample text" .s icursor end event generate .s <<PrevWord>> ; # shall move insert to index 9 .s delete insert end - .s get + lappend res [.s get] + .s delete 0 end + .s insert end "A sample text" + .s icursor 2 + event generate .s <<NextWord>> ; # shall move insert to index 9 + .s delete 0 insert + lappend res [.s get] } -cleanup { destroy .s -} -result {A sample } +} -result {{A sample } text} # nostomp: NB intentional difference between ttk::spinbox and tk::spinbox; @@ -376,6 +383,20 @@ test spinbox-dieoctaldie-2 "Cope with general bad input" -body { destroy .sb } +test spinbox-5.1 "style command" -body { + ttk::spinbox .w + list [.w cget -style] [.w style] [winfo class .w] +} -cleanup { + destroy .w +} -result {{} TSpinbox TSpinbox} +test spinbox-5.2 "style command" -body { + ttk::style configure customStyle.TSpinbox + ttk::spinbox .w -style customStyle.TSpinbox + list [.w cget -style] [.w style] [winfo class .w] +} -cleanup { + destroy .w +} -result {customStyle.TSpinbox customStyle.TSpinbox TSpinbox} + tcltest::cleanupTests # Local variables: |