summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/column.test45
-rw-r--r--tests/notify-old.test6
-rw-r--r--tests/notify.test6
-rw-r--r--tests/treectrl.test54
4 files changed, 43 insertions, 68 deletions
diff --git a/tests/column.test b/tests/column.test
index ac3265e..827be23 100644
--- a/tests/column.test
+++ b/tests/column.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# CVS: @(#) $Id: column.test,v 1.5 2005/03/29 20:40:24 treectrl Exp $
+# CVS: @(#) $Id: column.test,v 1.6 2005/05/11 03:31:58 treectrl Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -125,22 +125,22 @@ test column-3.10 {column configure/cget: -arrowgravity} -body {
.t column cget column1 -arrowgravity
} -result {right}
-test column-3.11 {column configure: invalid -arrowpad} -body {
- .t column configure column1 -arrowpad x
+test column-3.11 {column configure: invalid -arrowpadx} -body {
+ .t column configure column1 -arrowpadx x
} -returnCodes error -result {bad pad amount "x": must be a list of 1 or 2 positive screen distances}
-test column-3.11a {column configure: invalid 2 element -arrowpad} -body {
- .t column configure column1 -arrowpad {3 x}
+test column-3.11a {column configure: invalid 2 element -arrowpadx} -body {
+ .t column configure column1 -arrowpadx {3 x}
} -returnCodes error -result {bad pad amount "3 x": must be a list of 1 or 2 positive screen distances}
-test column-3.12 {column configure/cget: -arrowpad} -body {
- .t column configure column1 -arrowpad 8
- .t column cget column1 -arrowpad
+test column-3.12 {column configure/cget: -arrowpadx} -body {
+ .t column configure column1 -arrowpadx 8
+ .t column cget column1 -arrowpadx
} -result {8}
-test column-3.12a {column configure/cget: 2 element -arrowpad} -body {
- .t column configure column1 -arrowpad {8 5}
- .t column cget column1 -arrowpad
+test column-3.12a {column configure/cget: 2 element -arrowpadx} -body {
+ .t column configure column1 -arrowpadx {8 5}
+ .t column cget column1 -arrowpadx
} -result {8 5}
test column-3.13 {column configure: invalid -bitmap} -body {
@@ -253,14 +253,14 @@ test column-3.34 {column configure/cget: -minwidth} -body {
.t column cget column1 -minwidth
} -result {25}
-test column-3.35 {column configure: invalid -relief} -body {
- .t column configure column1 -relief yes
-} -returnCodes error -result {bad relief "yes": must be flat, groove, raised, ridge, solid, or sunken}
+test column-3.35 {column configure: invalid -state} -body {
+ .t column configure column1 -state yes
+} -returnCodes error -result {bad state "yes": must be normal, active, or pressed}
-test column-3.36 {column configure/cget: -relief} -body {
- .t column configure column1 -relief sunken
- .t column cget column1 -relief
-} -result {sunken}
+test column-3.36 {column configure/cget: -state} -body {
+ .t column configure column1 -state pressed
+ .t column cget column1 -state
+} -result {pressed}
test column-3.37 {column configure: invalid -stepwidth} -body {
.t column configure column1 -stepwidth "\t"
@@ -271,15 +271,6 @@ test column-3.38 {column configure/cget: -stepwidth} -body {
.t column cget column1 -stepwidth
} -result {125}
-test column-3.39 {column configure: invalid -sunken} -body {
- .t column configure column1 -sunken groove
-} -returnCodes error -result {expected boolean value but got "groove"}
-
-test column-3.40 {column configure/cget: -sunken} -body {
- .t column configure column1 -sunken on
- .t column cget column1 -sunken
-} -result {1}
-
test column-3.41 {column configure: -text} -body {
.t column configure column1 -text "Text above Column 1"
.t column cget column1 -text
diff --git a/tests/notify-old.test b/tests/notify-old.test
index 0102e42..80ac230 100644
--- a/tests/notify-old.test
+++ b/tests/notify-old.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# CVS: @(#) $Id: notify-old.test,v 1.1 2005/03/29 20:34:28 treectrl Exp $
+# CVS: @(#) $Id: notify-old.test,v 1.2 2005/05/11 03:31:59 treectrl Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -38,7 +38,7 @@ test notify-2.1 {notify eventnames: too much args} -body {
test notify-2.2 {notify eventnames: nothing own installed yet} -body {
lsort [.t notify eventnames]
-} -result {ActiveItem Collapse Expand Scroll Selection}
+} -result {ActiveItem Collapse Expand ItemDelete Scroll Selection}
test notify-2.3 {notify install: missing args} -body {
.t notify install
@@ -63,7 +63,7 @@ test notify-2.7 {notify install event} -body {
test notify-2.8 {notify eventnames: list Greetings} -body {
lsort [.t notify eventnames]
-} -result {ActiveItem Collapse Expand GoodBye Greetings Scroll Selection}
+} -result {ActiveItem Collapse Expand GoodBye Greetings ItemDelete Scroll Selection}
test notify-2.9 {notify detailnames: missing args} -body {
.t notify detailnames
diff --git a/tests/notify.test b/tests/notify.test
index 1e75d2b..3a1caf3 100644
--- a/tests/notify.test
+++ b/tests/notify.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# CVS: @(#) $Id: notify.test,v 1.3 2005/03/29 20:34:28 treectrl Exp $
+# CVS: @(#) $Id: notify.test,v 1.4 2005/05/11 03:31:59 treectrl Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -38,7 +38,7 @@ test notify-2.1 {notify eventnames: too much args} -body {
test notify-2.2 {notify eventnames: nothing own installed yet} -body {
lsort [.t notify eventnames]
-} -result {ActiveItem Collapse Expand Scroll Selection}
+} -result {ActiveItem Collapse Expand ItemDelete Scroll Selection}
test notify-2.3 {notify install: missing args} -body {
.t notify install
@@ -59,7 +59,7 @@ test notify-2.7 {notify install event} -body {
test notify-2.8 {notify eventnames: list Greetings} -body {
lsort [.t notify eventnames]
-} -result {ActiveItem Collapse Expand GoodBye Greetings Scroll Selection}
+} -result {ActiveItem Collapse Expand GoodBye Greetings ItemDelete Scroll Selection}
test notify-2.9 {notify detailnames: missing args} -body {
.t notify detailnames
diff --git a/tests/treectrl.test b/tests/treectrl.test
index 7e3244d..4f4f95e 100644
--- a/tests/treectrl.test
+++ b/tests/treectrl.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: treectrl.test,v 1.23 2005/03/29 20:43:25 treectrl Exp $
+# RCS: @(#) $Id: treectrl.test,v 1.24 2005/05/11 03:31:59 treectrl Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -37,7 +37,7 @@ test treectrl-1.4 {configure: List all options} -body {
} -result {{-background background Background white *}*} -match glob
test treectrl-1.5 {configure -background with totally empty visible tree} -body {
- pack .t
+ pack .t -expand yes -fill both
update idletasks
.t configure -background white
update idletasks
@@ -75,42 +75,24 @@ test treectrl-1.12 {configure: -buttoncolor option} -body {
.t configure -buttoncolor
} -result {-buttoncolor buttonColor ButtonColor #808080 red}
-test treectrl-1.13 {configure: invalid -openbuttonbitmap option} -body {
- .t configure -openbuttonbitmap foo
+test treectrl-1.13 {configure: invalid -buttonbitmap option} -body {
+ .t configure -buttonbitmap foo
} -returnCodes error -result {bitmap "foo" not defined}
-test treectrl-1.14 {configure: -openbuttonbitmap option} -body {
- .t configure -openbuttonbitmap hourglass
- .t configure -openbuttonbitmap
-} -result {-openbuttonbitmap openButtonBitmap OpenButtonBitmap {} hourglass}
+test treectrl-1.14 {configure: -buttonbitmap option} -body {
+ .t configure -buttonbitmap hourglass
+ .t configure -buttonbitmap
+} -result {-buttonbitmap buttonBitmap ButtonBitmap {} hourglass}
-test treectrl-1.15 {configure: invalid -closedbuttonbitmap option} -body {
- .t configure -closedbuttonbitmap foo
-} -returnCodes error -result {bitmap "foo" not defined}
-
-test treectrl-1.16 {configure: -closedbuttonbitmap option} -body {
- .t configure -closedbuttonbitmap questhead
- .t configure -closedbuttonbitmap
-} -result {-closedbuttonbitmap closedButtonBitmap ClosedButtonBitmap {} questhead}
-
-test treectrl-1.17 {configure: invalid -openbuttonimage option} -body {
- .t configure -openbuttonimage foo
+test treectrl-1.17 {configure: invalid -buttonimage option} -body {
+ .t configure -buttonimage foo
} -returnCodes error -result {image "foo" doesn't exist}
-test treectrl-1.18 {configure: -openbuttonimage option} -body {
+test treectrl-1.18 {configure: -buttonimage option} -body {
image create photo emptyImg
- .t configure -openbuttonimage emptyImg
- .t configure -openbuttonimage
-} -result {-openbuttonimage openButtonImage OpenButtonImage {} emptyImg}
-
-test treectrl-1.19 {configure: invalid -closedbuttonimage option} -body {
- .t configure -closedbuttonimage foo
-} -returnCodes error -result {image "foo" doesn't exist}
-
-test treectrl-1.20 {configure: -closedbuttonimage option} -body {
- .t configure -closedbuttonimage emptyImg
- .t configure -closedbuttonimage
-} -result {-closedbuttonimage closedButtonImage ClosedButtonImage {} emptyImg}
+ .t configure -buttonimage emptyImg
+ .t configure -buttonimage
+} -result {-buttonimage buttonImage ButtonImage {} emptyImg}
test treectrl-1.21 {configure: invalid -doublebuffer option} -body {
.t configure -doublebuffer foo
@@ -867,6 +849,7 @@ test treectrl-14.1 {rename and change some columns} -body {
} -result {}
test treectrl-15.1 {identify: missing args} -body {
+ wm geometry . 400x200 ; update
.t identify
} -returnCodes error -result {wrong # args: should be ".t identify x y"}
@@ -1000,10 +983,11 @@ test treectrl-17.3 {columnproxy: Negative screen distance} -body {
test treectrl-17.4 {columnproxy: screen distance bigger than width} -body {
# It is unclear if this should be forbiden...
- .t configure -columnproxy [expr {[winfo width .t] + 10}]
+ set x [expr {[winfo width .t] + 10}]
+ .t configure -columnproxy $x
update idletasks
- .t cget -columnproxy
-} -result {216}
+ expr {[.t cget -columnproxy] == $x}
+} -result {1}
test treectrl-17.5 {columnproxy} -body {
.t configure -columnproxy 100