summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authortreectrl <treectrl>2004-07-26 17:33:14 (GMT)
committertreectrl <treectrl>2004-07-26 17:33:14 (GMT)
commit2eda7efd40dab6b5f72cd000eae6ac0d8fc8712d (patch)
treee57a3378728db236b3e4e7eabf086c8b2c9a7699 /tests
parent0d78872bcbd0fff4a45ff3823043ccf5f5790c21 (diff)
downloadtktreectrl-2eda7efd40dab6b5f72cd000eae6ac0d8fc8712d.zip
tktreectrl-2eda7efd40dab6b5f72cd000eae6ac0d8fc8712d.tar.gz
tktreectrl-2eda7efd40dab6b5f72cd000eae6ac0d8fc8712d.tar.bz2
Changes for new "column create" command.
Diffstat (limited to 'tests')
-rw-r--r--tests/column.test10
-rw-r--r--tests/item.test4
-rw-r--r--tests/treectrl.test12
3 files changed, 15 insertions, 11 deletions
diff --git a/tests/column.test b/tests/column.test
index a3b1635..3628fb9 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.3 2003/01/04 13:18:30 krischan Exp $
+# CVS: @(#) $Id: column.test,v 1.4 2004/07/26 17:33:14 treectrl Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -34,7 +34,7 @@ test column-1.1 {missing args} -body {
test column-1.2 {unknown command} -body {
.t column foo
-} -returnCodes error -result {bad command "foo": must be bbox, cget, configure, delete, index, move, neededwidth, or width}
+} -returnCodes error -result {bad command "foo": must be bbox, cget, configure, create, delete, index, move, neededwidth, or width}
test column-1.3 {configure: no column exists with numerical index} -body {
.t column configure 0
@@ -45,6 +45,7 @@ test column-1.4 {configure: no column exists with tag} -body {
} -returnCodes error -result {column with tag "column0" doesn't exist}
test column-1.5 {configure: create and fill a column} -body {
+ .t column create
.t column configure 0 -tag column0
.t element create e rect -width 482
.t style create s
@@ -55,6 +56,7 @@ test column-1.5 {configure: create and fill a column} -body {
} -result {1}
test column-1.6 {configure: create another column} -body {
+ .t column create
.t column configure 1 -tag column1
} -result {}
@@ -392,8 +394,8 @@ test column-7.2 {column move: invalid column} -body {
} -returnCodes error -result {bad column index "2": must be from 0 to 0}
test column-7.3 {column move: invalid column} -body {
- .t column configure 1 -tag column1
- .t column configure 2 -tag column3
+ .t column create -tag column1
+ .t column create -tag column3
.t column move 0 2
.t column index column2
} -result {1}
diff --git a/tests/item.test b/tests/item.test
index 9d059dd..812a5a2 100644
--- a/tests/item.test
+++ b/tests/item.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: item.test,v 1.6 2003/01/06 23:00:33 krischan Exp $
+# CVS: @(#) $Id: item.test,v 1.7 2004/07/26 17:33:14 treectrl Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -191,6 +191,7 @@ test item-13.2 {item complex: only allowed if column style is defined} -body {
} -returnCodes error -result {item 8 doesn't have column 0}
test item-13.3 {item complex: invalid list} -body {
+ .t column create
.t item style set 8 0 testStyle
.t item complex 8 {{e1 -text}}
} -returnCodes error -result {wrong # args: should be "element option value..."}
@@ -470,6 +471,7 @@ proc listItems {t {i root}} {
}
test item-17.9 {item sort: set the texts in column 0 for all items} -body {
+ .t column create
.t style create textStyle
.t style elements textStyle {eRect eBorder eText}
.t element create eTime text
diff --git a/tests/treectrl.test b/tests/treectrl.test
index 0b052b0..8288058 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.20 2003/01/08 07:00:34 krischan Exp $
+# RCS: @(#) $Id: treectrl.test,v 1.21 2004/07/26 17:33:14 treectrl Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -245,8 +245,8 @@ test treectrl-1.48 {configure: -treecolumn option with unknown column} -body {
} -result {-treecolumn treeColumn TreeColumn 0 1}
test treectrl-1.49 {configure: -treecolumn option with known column} -body {
- .t column configure 0 -tag column0
- .t column configure 1 -tag column2
+ .t column create -tag column0
+ .t column create -tag column2
.t configure -treecolumn 1
.t configure -treecolumn
} -result {-treecolumn treeColumn TreeColumn 0 1}
@@ -864,9 +864,9 @@ test treectrl-13.5 {depth of the tree} -body {
} -result {0}
test treectrl-14.1 {rename and change some columns} -body {
- .t column delete 0
- .t column configure 1 -tag column1
- .t column configure 2 -tag column3
+ .t column delete column0
+ .t column create -tag column1
+ .t column create -tag column3
.t column move 0 2
.t column move 0 tail
.t element create eText2 text -font {{courier -12}} -text "Hello World"