diff options
author | Jason Molenda <jmolenda@apple.com> | 2000-02-07 00:19:28 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2000-02-07 00:19:28 +0000 |
commit | b111a96ea19bde1004ecea63c7827a1d4b0b73ef (patch) | |
tree | 2b8155215201f5224d8f68ec53f9720a89dfbdd9 /tix/tests/tlist/TList.tcl | |
parent | b73e43e34794f4903b0bf2e0fc1298547ef01faf (diff) | |
download | gdb-b111a96ea19bde1004ecea63c7827a1d4b0b73ef.tar.gz |
import insight-2000-02-04 snapshot (2nd try)
Diffstat (limited to 'tix/tests/tlist/TList.tcl')
-rw-r--r-- | tix/tests/tlist/TList.tcl | 38 |
1 files changed, 38 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 +} |