diff options
Diffstat (limited to 'tests/tree.test')
-rw-r--r-- | tests/tree.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/tree.test b/tests/tree.test index 5a7cf74..22a16f5 100644 --- a/tests/tree.test +++ b/tests/tree.test @@ -110,6 +110,21 @@ test tree-2.3 "walk bfs" { set result } {rootnode childnode1 root.c2 root.c3 childnode2 n.c4 n.c5 n.c5.c6} +test tree-3.1 "delete nodes" { + $pt delete node6 + set result {} + $pt walk root bfs {action n} { + if {$action == "enter"} { + lappend result [$pt get $n name] + } + } + set result +} {rootnode childnode1 root.c2 root.c3 childnode2 n.c4} + +test tree-3.2 "can't delete root node" -body { + $pt delete root +} -returnCodes error -result {can't delete root node} + $pt destroy testreport |