summaryrefslogtreecommitdiffstats
path: root/tests/ttk
diff options
context:
space:
mode:
authorpspjuth <peter.spjuth@gmail.com>2012-08-26 17:07:19 (GMT)
committerpspjuth <peter.spjuth@gmail.com>2012-08-26 17:07:19 (GMT)
commit2c2a2e6522dcfc11aaa8017b47bc14485313349b (patch)
treed0cf2a1e6e56525333957dd5fe2aab36bf174a4c /tests/ttk
parentfc0e57edc8cb5ad99ea9540032237367f8b0a777 (diff)
parente4c7ef5bdf6375e1860418b1ec92c07f88660cc8 (diff)
downloadtk-pspjuth_canvas.zip
tk-pspjuth_canvas.tar.gz
tk-pspjuth_canvas.tar.bz2
merge trunkpspjuth_canvas
Diffstat (limited to 'tests/ttk')
-rw-r--r--tests/ttk/all.tcl2
-rw-r--r--tests/ttk/checkbutton.test1
-rw-r--r--tests/ttk/image.test4
-rw-r--r--tests/ttk/labelframe.test4
-rw-r--r--tests/ttk/layout.test4
-rw-r--r--tests/ttk/notebook.test4
-rw-r--r--tests/ttk/panedwindow.test4
-rw-r--r--tests/ttk/progressbar.test4
-rw-r--r--tests/ttk/radiobutton.test1
-rw-r--r--tests/ttk/scrollbar.test4
-rw-r--r--tests/ttk/treetags.test3
-rw-r--r--tests/ttk/treeview.test2
-rw-r--r--tests/ttk/ttk.test55
-rw-r--r--tests/ttk/vsapi.test1
14 files changed, 51 insertions, 42 deletions
diff --git a/tests/ttk/all.tcl b/tests/ttk/all.tcl
index 2cc7bad..da2e316 100644
--- a/tests/ttk/all.tcl
+++ b/tests/ttk/all.tcl
@@ -8,8 +8,6 @@
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: all.tcl,v 1.3 2007/12/13 15:28:49 dgp Exp $
package require Tcl 8.5
package require tcltest 2.2
diff --git a/tests/ttk/checkbutton.test b/tests/ttk/checkbutton.test
index 1ff6320..e18ff32 100644
--- a/tests/ttk/checkbutton.test
+++ b/tests/ttk/checkbutton.test
@@ -1,4 +1,3 @@
-# $Id: checkbutton.test,v 1.1 2008/12/31 23:10:48 jenglish Exp $
#
# ttk::checkbutton widget tests.
#
diff --git a/tests/ttk/image.test b/tests/ttk/image.test
index 8f7338e..a55f7f8 100644
--- a/tests/ttk/image.test
+++ b/tests/ttk/image.test
@@ -1,7 +1,3 @@
-#
-# $Id: image.test,v 1.4 2007/12/13 15:28:49 dgp Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/labelframe.test b/tests/ttk/labelframe.test
index 1dd5573..28b4d2e 100644
--- a/tests/ttk/labelframe.test
+++ b/tests/ttk/labelframe.test
@@ -1,7 +1,3 @@
-#
-# $Id: labelframe.test,v 1.1 2006/10/31 01:42:27 hobbs Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/layout.test b/tests/ttk/layout.test
index 4b69b3c..814e1d9 100644
--- a/tests/ttk/layout.test
+++ b/tests/ttk/layout.test
@@ -1,7 +1,3 @@
-#
-# $Id: layout.test,v 1.1 2006/10/31 01:42:27 hobbs Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/notebook.test b/tests/ttk/notebook.test
index b58efd7..cdce020 100644
--- a/tests/ttk/notebook.test
+++ b/tests/ttk/notebook.test
@@ -1,7 +1,3 @@
-#
-# $Id: notebook.test,v 1.5 2007/12/13 15:28:49 dgp Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/panedwindow.test b/tests/ttk/panedwindow.test
index 3bddbee..7fe5c87 100644
--- a/tests/ttk/panedwindow.test
+++ b/tests/ttk/panedwindow.test
@@ -1,7 +1,3 @@
-#
-# $Id: panedwindow.test,v 1.6 2007/12/13 15:28:49 dgp Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/progressbar.test b/tests/ttk/progressbar.test
index ead15f6..b9add86 100644
--- a/tests/ttk/progressbar.test
+++ b/tests/ttk/progressbar.test
@@ -1,7 +1,3 @@
-#
-# $Id: progressbar.test,v 1.1 2006/10/31 01:42:27 hobbs Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/radiobutton.test b/tests/ttk/radiobutton.test
index 5daf83a..ba02954 100644
--- a/tests/ttk/radiobutton.test
+++ b/tests/ttk/radiobutton.test
@@ -1,4 +1,3 @@
-# $Id: radiobutton.test,v 1.1 2008/12/31 23:10:48 jenglish Exp $
#
# ttk::radiobutton widget tests.
#
diff --git a/tests/ttk/scrollbar.test b/tests/ttk/scrollbar.test
index 63c97b2..0464273 100644
--- a/tests/ttk/scrollbar.test
+++ b/tests/ttk/scrollbar.test
@@ -1,7 +1,3 @@
-#
-# $Id: scrollbar.test,v 1.3 2007/12/13 15:28:49 dgp Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/treetags.test b/tests/ttk/treetags.test
index ed139a1..7f26e2f 100644
--- a/tests/ttk/treetags.test
+++ b/tests/ttk/treetags.test
@@ -1,6 +1,3 @@
-#
-# $Id: treetags.test,v 1.3 2010/03/28 21:43:25 jenglish Exp $
-#
package require Tk
package require tcltest ; namespace import -force tcltest::*
diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test
index 79d4b17..d8bc65d 100644
--- a/tests/ttk/treeview.test
+++ b/tests/ttk/treeview.test
@@ -1,6 +1,4 @@
#
-# $Id: treeview.test,v 1.8 2010/10/11 21:34:45 jenglish Exp $
-#
# [7Jun2005] TO CHECK: [$tv see {}] -- shouldn't work (at least, shouldn't do
# what it currently does)
#
diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test
index ddfaf84..def709e 100644
--- a/tests/ttk/ttk.test
+++ b/tests/ttk/ttk.test
@@ -6,6 +6,14 @@ loadTestedCommands
proc skip args {}
proc ok {} { return }
+variable widgetClasses {
+ button checkbutton radiobutton menubutton label entry
+ frame labelframe scrollbar
+ notebook progressbar combobox separator
+ panedwindow treeview sizegrip
+ scale
+}
+
proc bgerror {error} {
variable bgerror $error
variable bgerrorInfo $::errorInfo
@@ -62,10 +70,7 @@ test ttk-6.6 "Bad color spec in styles" -body {
} -result {unknown color name "badColor"}
test ttk-6.7 "Basic destruction test" -body {
- foreach widget {
- button checkbutton radiobutton sizegrip separator notebook
- progressbar panedwindow scrollbar
- } {
+ foreach widget $widgetClasses {
ttk::$widget .w
pack .w
destroy .w
@@ -214,6 +219,21 @@ test ttk-2.8 "bug 3223850: button state disabled during click" -setup {
unset -nocomplain ttk28 aid
} -result 1
+foreach wc $widgetClasses {
+ test ttk-coreoptions-$wc "$wc has all core options" -body {
+ ttk::$wc .w
+ foreach option {
+ -class
+ -style
+ -cursor
+ -takefocus
+ } {
+ .w cget $option
+ }
+ destroy .w
+ }
+}
+
# misc. error detection
test ttk-3.0 "Bad option" -body {
ttk::button .bad -badoption foo
@@ -555,6 +575,33 @@ test ttk-14.3 "-textvariable in nonexistant namespace" -body {
} -returnCodes 1 -result {can't trace *: parent namespace doesn't exist} \
-match glob -cleanup { destroy .tw }
+test ttk-15.1 {Bug 3062331} -setup {
+ destroy .b
+} -body {
+ set Y {}
+ ttk::button .b -textvariable Y
+ trace variable Y u "destroy .b; #"
+ unset Y
+} -cleanup {
+ destroy .b
+} -result {}
+
+test ttk-15.2 {Bug 3341056} -setup {
+ proc foo {} {
+ destroy .lf
+ ttk::labelframe .lf
+ ttk::checkbutton .lf.cb -text xxx
+ }
+} -body {
+ ttk::button .b -text xxx -command foo
+ .b invoke
+ .b invoke
+ .lf.cb invoke
+ destroy .b
+} -cleanup {
+ rename foo {}
+ destroy .lf
+} -result {}
## Test ensemble processing:
#
diff --git a/tests/ttk/vsapi.test b/tests/ttk/vsapi.test
index 5ce2b13..bb88fef 100644
--- a/tests/ttk/vsapi.test
+++ b/tests/ttk/vsapi.test
@@ -1,5 +1,4 @@
# -*- tcl -*-
-# $Id: vsapi.test,v 1.1 2008/04/09 09:27:22 patthoyts Exp $
#
package require Tk 8.5