diff options
author | treectrl <treectrl> | 2007-11-12 04:07:16 (GMT) |
---|---|---|
committer | treectrl <treectrl> | 2007-11-12 04:07:16 (GMT) |
commit | a144c6bd8081a7aea7751dbf82b56e551bfc9d0a (patch) | |
tree | ad27571831db4352906e518658e46491b14e657b /tests/itemdesc.test | |
parent | 7c25a78404f5e37517f48b0f9c4ffc0084d0a14b (diff) | |
download | tktreectrl-a144c6bd8081a7aea7751dbf82b56e551bfc9d0a.zip tktreectrl-a144c6bd8081a7aea7751dbf82b56e551bfc9d0a.tar.gz tktreectrl-a144c6bd8081a7aea7751dbf82b56e551bfc9d0a.tar.bz2 |
Added tests of -itemtagexpr.
Diffstat (limited to 'tests/itemdesc.test')
-rw-r--r-- | tests/itemdesc.test | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/itemdesc.test b/tests/itemdesc.test index f49fd3e..418c404 100644 --- a/tests/itemdesc.test +++ b/tests/itemdesc.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: itemdesc.test,v 1.2 2006/11/18 04:43:23 treectrl Exp $ +# RCS: @(#) $Id: itemdesc.test,v 1.3 2007/11/12 04:07:16 treectrl Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -488,6 +488,25 @@ test itemdesc-6.2 {-itemprefix same as a tag} -setup { .t item tag remove all item1 } -result {item2 item3 item4} +test itemdesc-7.1 {-itemtagexpr, error} -setup { + .t item tag add "depth 1" a&&b|| +} -body { + lsort -dictionary [.t item id "tag a&&b||"] +} -returnCodes error -result {Missing tag in tag search expression} + +test itemdesc-7.2 {-itemtagexpr, tag as first word} -setup { + .t configure -itemtagexpr false +} -body { + lsort -dictionary [.t item id "a&&b||"] +} -result {1 5 8} + +test itemdesc-7.3 {-itemtagexpr, tag as qualifier} -body { + lsort -dictionary [.t item id "tag a&&b||"] +} -cleanup { + .t configure -itemtagexpr true + .t item tag remove all a&&b|| +} -result {1 5 8} + test itemdesc-99.1 {some needed cleanup} -body { destroy .t } -result {} |