From b111a96ea19bde1004ecea63c7827a1d4b0b73ef Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Mon, 7 Feb 2000 00:19:28 +0000 Subject: import insight-2000-02-04 snapshot (2nd try) --- tix/tests/tlist/TList.tcl | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tix/tests/tlist/TList.tcl (limited to 'tix/tests/tlist/TList.tcl') 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 +} -- cgit v1.2.1