diff options
author | treectrl <treectrl> | 2006-09-22 23:29:46 (GMT) |
---|---|---|
committer | treectrl <treectrl> | 2006-09-22 23:29:46 (GMT) |
commit | ddc5df29d0a9375f54ce6636b45c926f61a10d74 (patch) | |
tree | a9fa8467c0bd322627eefbb47523211ac99f879c | |
parent | 6e1620deaf7fd450db6aece4c96b278feee1b672 (diff) | |
download | tktreectrl-ddc5df29d0a9375f54ce6636b45c926f61a10d74.zip tktreectrl-ddc5df29d0a9375f54ce6636b45c926f61a10d74.tar.gz tktreectrl-ddc5df29d0a9375f54ce6636b45c926f61a10d74.tar.bz2 |
[item id all] is allowed.
Added tests for new item-description keywords: list range, ancestors and children which select multiple items.
-rw-r--r-- | tests/treectrl.test | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/tests/treectrl.test b/tests/treectrl.test index cff4ec5..b71b613 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.29 2006/09/16 20:33:39 treectrl Exp $ +# RCS: @(#) $Id: treectrl.test,v 1.30 2006/09/22 23:29:46 treectrl Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -253,8 +253,11 @@ test treectrl-2.1 {bogus itemdesc} -body { } -returnCodes error -result {bad item description "foo"} test treectrl-2.2 {is all allowed?} -body { - .t item id all -} -returnCodes error -result {can't specify "all" for this command} + .t item create -count 10 + set res [lsort -integer [.t item id all]] + .t item delete all + set res +} -result {0 1 2 3 4 5 6 7 8 9 10} test treectrl-2.3 {itemdesc number unknown} -body { .t see 999 @@ -495,6 +498,29 @@ test treectrl-2.37 {modifier cocktail} -body { set res } -result {8 8 1 5 4 3 2 1 5 7 8} +test treectrl-2.38 {multiple items: list} -body { + .t item id "list {3 8 8}" +} -result {3 8 8} + +test treectrl-2.39 {multiple items: range} -body { + .t item id "range 1 6" +} -result {1 2 3 4 5 6} + +test treectrl-2.40 {multiple items: range reversed} -body { + .t item id "range 6 1" +} -result {1 2 3 4 5 6} + +test treectrl-2.41 {multiple items: ancestors} -body { + .t item id "4 ancestors" +} -result {3 1 0} + +test treectrl-2.42 {multiple items: children} -body { + .t item id "root children" +} -result {1 5 8} + +test treectrl-2.43 {multiple items: nested list} -body { + .t item id "list {3 {list {1 root}} 4}" +} -result {3 1 0 4} # qualifiers in item descriptions test treectrl-3.1 {where visible is allowed} -body { |