diff options
author | fvogel <fvogelnew1@free.fr> | 2020-05-24 08:46:04 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2020-05-24 08:46:04 (GMT) |
commit | ad1ded4a7f409e06bd6e1b33da463e6c7cd844af (patch) | |
tree | c61968e6cab981d9a1f3f06957c8a04d2c67ddfb /tests | |
parent | 5a5048886596a6874877e5c98ccf9fac7576f3dd (diff) | |
parent | 4967e9c77f3209c4b99b21208c55d527a5a74799 (diff) | |
download | tk-ad1ded4a7f409e06bd6e1b33da463e6c7cd844af.zip tk-ad1ded4a7f409e06bd6e1b33da463e6c7cd844af.tar.gz tk-ad1ded4a7f409e06bd6e1b33da463e6c7cd844af.tar.bz2 |
Merge implementation of TIP #574 following acceptation by vote.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ttk/treetags.test | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/ttk/treetags.test b/tests/ttk/treetags.test index 09c34e0..fd3a0c5 100644 --- a/tests/ttk/treetags.test +++ b/tests/ttk/treetags.test @@ -11,12 +11,11 @@ proc assert {expr {message ""}} { error "PANIC: $message ($expr failed)" } } -proc in {e l} { expr {[lsearch -exact $l $e] >= 0} } proc itemConstraints {tv item} { # $tag in [$tv item $item -tags] <==> [$tv tag has $tag $item] foreach tag [$tv item $item -tags] { - assert {[in $item [$tv tag has $tag]]} + assert {$item in [$tv tag has $tag]} } foreach child [$tv children $item] { itemConstraints $tv $child @@ -28,7 +27,7 @@ proc treeConstraints {tv} { # foreach tag [$tv tag names] { foreach item [$tv tag has $tag] { - assert {[in $tag [$tv item $item -tags]]} + assert {$tag in [$tv item $item -tags]} } } @@ -114,6 +113,12 @@ test treetags-1.10 "tag names - tag configured" -body { lsort [$tv tag names] } -result [list tag1 tag2 tag3 tag4 tag5] +test treetags-1.11 "tag delete" -body { + $tv tag delete tag5 + $tv tag delete tag4 + lsort [$tv tag names] +} -result [list tag1 tag2 tag3] + test treetags-1.end "cleanup" -body { $tv item item1 -tags tag1 $tv item item2 -tags tag2 |