summaryrefslogtreecommitdiff
path: root/tix/tests/hlist/HLInd.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tix/tests/hlist/HLInd.tcl')
-rw-r--r--tix/tests/hlist/HLInd.tcl51
1 files changed, 51 insertions, 0 deletions
diff --git a/tix/tests/hlist/HLInd.tcl b/tix/tests/hlist/HLInd.tcl
new file mode 100644
index 00000000000..ed4f127366e
--- /dev/null
+++ b/tix/tests/hlist/HLInd.tcl
@@ -0,0 +1,51 @@
+proc Test {} {
+ set h [tixHList .h -indicator 1 -indent 20]
+ pack $h -expand yes -fill both
+ button .b -text close -command "Done forced"
+ pack .b
+
+ $h add hello -text hello
+ $h add noind -text hello
+
+ test {$h indicator} {args}
+ test {$h indicator bad} {unknown}
+
+ # Test for create
+ #
+ #
+
+ test {$h indicator create} {args}
+ test {$h indicator create xyz} {{not found}}
+ test {$h indicator create hello -itemtype} {missing}
+ test {$h indicator create hello -itemtype bad} {unknown}
+ test {$h indicator create hello -itemtype imagetext \
+ -image [tix getimage plus]}
+
+ # Test for cget
+ #
+ test {$h indicator cget} {args}
+ test {$h indicator cget hello} {args}
+ test {$h indicator cget hello arg arg} {args}
+ test {$h indicator cget noind -text} {{does not have}}
+ test {$h indicator cget hello -bad} {{unknown}}
+ test {$h indicator cget hello -image}
+
+ # Test for size
+ #
+ test {$h indicator size} {args}
+ test {$h indicator size hello hi} {args}
+ test {$h indicator size bad} {{not found}}
+ test {$h indicator size noind} {{does not have}}
+ test {set x [$h indicator size hello]}
+ test {$h indicator cget hello -image} {{does not}}
+
+ # Test for delete
+ #
+ test {$h indicator delete} {args}
+ test {$h indicator delete hello hi} {args}
+ test {$h indicator delete bad} {{not found}}
+ test {$h indicator delete hello}
+ test {$h indicator cget hello -image} {{does not}}
+
+ update
+}