summaryrefslogtreecommitdiff
path: root/tix/tests/tlist
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2000-02-07 00:19:28 +0000
committerJason Molenda <jmolenda@apple.com>2000-02-07 00:19:28 +0000
commitb111a96ea19bde1004ecea63c7827a1d4b0b73ef (patch)
tree2b8155215201f5224d8f68ec53f9720a89dfbdd9 /tix/tests/tlist
parentb73e43e34794f4903b0bf2e0fc1298547ef01faf (diff)
downloadgdb-b111a96ea19bde1004ecea63c7827a1d4b0b73ef.tar.gz
import insight-2000-02-04 snapshot (2nd try)
Diffstat (limited to 'tix/tests/tlist')
-rw-r--r--tix/tests/tlist/TList.tcl38
-rw-r--r--tix/tests/tlist/files1
2 files changed, 39 insertions, 0 deletions
diff --git a/tix/tests/tlist/TList.tcl b/tix/tests/tlist/TList.tcl
new file mode 100644
index 00000000000..536f8b8c8f4
--- /dev/null
+++ b/tix/tests/tlist/TList.tcl
@@ -0,0 +1,38 @@
+# This tests the TList widget.
+#
+#
+# Assumptions:
+# None
+#
+proc About {} {
+ return "Basic tests for the TList widget"
+}
+
+proc Test {} {
+
+ #
+ # Test the creation
+ #
+ test {tixTList} {args}
+ test {tixTList .t -ff} {unknown}
+ test {tixTList .t -width} {missing}
+
+ if {[info command .t] != {}} {
+ error "widget not destroyed when creation failed"
+ }
+
+ set t [tixTList .t]
+ test {$t} {args}
+
+ #
+ # Test the "insert" command
+ #
+ test {$t insert} {args}
+ test {$t insert 0 -foo} {missing}
+ test {$t insert 0 -foo bar} {unknown}
+ test {$t insert 0 -itemtype foo} {unknown}
+ test {$t insert 0 -itemtype text -image foo} {unknown}
+ test {$t insert 0 -itemtype text -text Hello}
+
+ pack $t
+}
diff --git a/tix/tests/tlist/files b/tix/tests/tlist/files
new file mode 100644
index 00000000000..7c39b5b8cac
--- /dev/null
+++ b/tix/tests/tlist/files
@@ -0,0 +1 @@
+TList.tcl \ No newline at end of file