summaryrefslogtreecommitdiffstats
path: root/tests/ttk/panedwindow.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ttk/panedwindow.test')
-rw-r--r--tests/ttk/panedwindow.test36
1 files changed, 27 insertions, 9 deletions
diff --git a/tests/ttk/panedwindow.test b/tests/ttk/panedwindow.test
index 3d55f22..b11244b 100644
--- a/tests/ttk/panedwindow.test
+++ b/tests/ttk/panedwindow.test
@@ -1,4 +1,4 @@
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
@@ -13,19 +13,19 @@ test panedwindow-1.0 "Setup" -body {
test panedwindow-1.0.1 "Make sure pane 0 command doesn't crash on empty pane - bug e6140f3404" -body {
.pw pane 0
-} -result {Slave index 0 out of bounds} -returnCodes error
+} -result {Managed window index "0" out of bounds} -returnCodes error
-test panedwindow-1.0.2 "Make sure pane -1 command doesn't crash on empty pane - bug e6140f3404" -body {
- .pw pane -1
-} -result {Slave index -1 out of bounds} -returnCodes error
+test panedwindow-1.0.2 "Make sure pane end command doesn't crash on empty pane - bug e6140f3404" -body {
+ .pw pane end
+} -result {Managed window index "end" out of bounds} -returnCodes error
test panedwindow-1.0.3 "Make sure forget 0 command doesn't crash on empty pane - bug e6140f3404" -body {
.pw forget 0
-} -result {Slave index 0 out of bounds} -returnCodes error
+} -result {Managed window index "0" out of bounds} -returnCodes error
-test panedwindow-1.0.4 "Make sure forget -1 command doesn't crash on empty pane - bug e6140f3404" -body {
- .pw forget -1
-} -result {Slave index -1 out of bounds} -returnCodes error
+test panedwindow-1.0.4 "Make sure forget end command doesn't crash on empty pane - bug e6140f3404" -body {
+ .pw forget end
+} -result {Managed window index "end" out of bounds} -returnCodes error
test panedwindow-1.1 "Make sure empty panedwindow doesn't crash" -body {
pack .pw -expand true -fill both
@@ -305,4 +305,22 @@ test paned-propagation-5 "Pane change after map, on-axis" -body {
test paned-propagation-cleanup "Clean up." -body { destroy .pw }
+test panedwindow-6.1 "style command" -body {
+ # Contrary to ttk::scrollbar, ttk::progressbar and ttk::scale,
+ # ttk::panedwindow has same style TPanedwindow whatever -orient is
+ ttk::panedwindow .wv ; # default is -orient vertical
+ ttk::panedwindow .wh -orient horizontal
+ list [.wv cget -style] [.wv style] [winfo class .wv]\
+ [.wh cget -style] [.wh style] [winfo class .wh]
+} -cleanup {
+ destroy .wv .wh
+} -result {{} TPanedwindow TPanedwindow {} TPanedwindow TPanedwindow}
+test panedwindow-6.2 "style command" -body {
+ ttk::style configure customStyle.TPanedwindow
+ ttk::panedwindow .w -style customStyle.TPanedwindow
+ list [.w cget -style] [.w style] [winfo class .w]
+} -cleanup {
+ destroy .w
+} -result {customStyle.TPanedwindow customStyle.TPanedwindow TPanedwindow}
+
tcltest::cleanupTests