summaryrefslogtreecommitdiffstats
path: root/tests/ttk
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ttk')
-rw-r--r--tests/ttk/bwidget.test101
-rw-r--r--tests/ttk/panedwindow.test6
2 files changed, 3 insertions, 104 deletions
diff --git a/tests/ttk/bwidget.test b/tests/ttk/bwidget.test
deleted file mode 100644
index f371daf..0000000
--- a/tests/ttk/bwidget.test
+++ /dev/null
@@ -1,101 +0,0 @@
-#
-# Test BWidget / Ttk compatibility.
-#
-# NOTE: This part of the test suite is no longer operative:
-# [namespace import -force ttk::*] is not expected or intended to work.
-#
-# Keeping the file around for now since it contains some historical
-# information about how ttk *tried* to make it work, and what
-# sort of things went wrong.
-#
-
-package require Tk 8.5
-package require tcltest
-tcltest::cleanupTests ; return
-
-loadTestedCommands
-
-set have_compat 0
-if {![catch {ttk::pkgconfig get compat} compat]} {set have_compat $compat}
-testConstraint bwidget [expr {$have_compat && ![catch {package require BWidget}]}]
-
-test bwidget-1.0 "Setup for BWidget test" -constraints bwidget -body {
- namespace import -force ttk::*
- puts "Loaded BWidget version [package provide BWidget]"
-}
-
-test bwidget-1.1 "Make Label widget" -constraints bwidget -body {
- pack [Label .w]
-} -cleanup {destroy .w}
-
-test bwidget-1.2 "Make ScrolledWindow widget" -constraints bwidget -body {
- pack [ScrolledWindow .w -auto both -scrollbar vertical]
-} -cleanup {destroy .w}
-
-test bwidget-1.3 "Make PagesManager widget" -constraints bwidget -body {
- pack [PagesManager .w]
-} -cleanup {destroy .w}
-
-#
-# ProgressBar: this one fails with 'unknown color name "xxx"',
-# where "xxx" is the default value of some other option
-# (variously, "4m", "100", something else).
-#
-# Update: fixed now. Source of problem: widgets were using "unused"
-# as the resource database name for compatibility options;
-# BWidgets keys off the db name instead of the option name.
-#
-test bwidget-1.4 "Make ProgressBar widget" -constraints bwidget -body {
- pack [ProgressBar .w]
-} -cleanup {destroy .w}
-
-# @@@ TODO: full BWidget coverage,
-# @@@ not just the ones people have reported problems with.
-
-
-#
-# <<NOTE-NULLOPTIONS>>:
-#
-# TK_OPTION_NULL_OK doesn't work for TK_OPTION_INT (among others);
-# see Bug #967209.
-#
-# This means that [.l configure -width [.l cget -width]] -- which is
-# essentially what BWidgets does -- will raise an error if -width has
-# a NULL default.
-#
-# Temporary workaround: declare -width, etc. as TK_OPTION_STRING instead.
-# This disables typechecking in the 'configure' method, but it seems
-# to be the best way to avoid the BWidget incompatibility for now.
-#
-test nulloptions-1.1 "Test null options" -body {
- ttk::label .tl
- .tl configure -width [.tl cget -width]
-} -cleanup { destroy .tl }
-
-#
-# <<NOTE-NULLOPTIONS-2>> This also means we have to (partially) disable
-# the widget option / element option consistency checks.
-#
-test nulloptions-1.2 "Ensure workaround doesn't break -width" -body {
- ttk::label .tl -text "x" -width 0
- set w1 [winfo reqwidth .tl]
- .tl configure -width 10
- set w2 [winfo reqwidth .tl]
- expr {$w2 > $w1}
-} -result 1 -cleanup { destroy .tl }
-
-test nulloptions-1.3 "Exhaustive test" -body {
- set readonlyOpts [list -class]
- foreach widget $::ttk::widgets {
- #puts "$widget"
- ttk::$widget .w
- foreach configspec [.w configure] {
- set option [lindex $configspec 0]
- if {[lsearch -exact $readonlyOpts $option] >= 0} { continue }
- .w configure $option [.w cget $option]
- }
- destroy .w
- }
-}
-
-tcltest::cleanupTests
diff --git a/tests/ttk/panedwindow.test b/tests/ttk/panedwindow.test
index 13a7e85..190e6b5 100644
--- a/tests/ttk/panedwindow.test
+++ b/tests/ttk/panedwindow.test
@@ -1,5 +1,5 @@
#
-# $Id: panedwindow.test,v 1.1 2006/10/31 01:42:27 hobbs Exp $
+# $Id: panedwindow.test,v 1.2 2006/11/07 03:45:28 jenglish Exp $
#
package require Tk 8.5
@@ -21,7 +21,7 @@ test panedwindow-1.1 "Make sure empty panedwindow doesn't crash" -body {
test panedwindow-1.2 "Add a pane" -body {
.pw add [ttk::frame .pw.f1]
winfo manager .pw.f1
-} -result "paned"
+} -result "panedwindow"
test panedwindow-1.3 "Steal pane" -body {
pack .pw.f1 -side bottom
@@ -36,7 +36,7 @@ test panedwindow-1.5 "Remanage pane" -body {
#XXX .pw insert 0 .pw.f1
.pw add .pw.f1
winfo manager .pw.f1
-} -result "paned"
+} -result "panedwindow"
test panedwindow-1.6 "Forget pane" -body {
.pw forget .pw.f1