summaryrefslogtreecommitdiffstats
path: root/tests/listbox.test
diff options
context:
space:
mode:
authorericm <ericm@noemail.net>1999-11-18 02:24:40 (GMT)
committerericm <ericm@noemail.net>1999-11-18 02:24:40 (GMT)
commit7d5bfc73d5208124a6ec5eb320e0c0caa5c89811 (patch)
treeec2f0d56df29f9a5eb0db051a7ff1248a74528d3 /tests/listbox.test
parent5a7fd9791160abf44abd63f3424d1f04828def84 (diff)
downloadtk-7d5bfc73d5208124a6ec5eb320e0c0caa5c89811.zip
tk-7d5bfc73d5208124a6ec5eb320e0c0caa5c89811.tar.gz
tk-7d5bfc73d5208124a6ec5eb320e0c0caa5c89811.tar.bz2
* tests/listbox.test: Updated tests for new error messages.
* generic/tkListbox.c: Improved error messages for bad -listvar's. FossilOrigin-Name: 016895b51cbfd533f23afcdec043aa6f25f031e1
Diffstat (limited to 'tests/listbox.test')
-rw-r--r--tests/listbox.test11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/listbox.test b/tests/listbox.test
index 5f3a683..76df7ef 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: listbox.test,v 1.7 1999/11/18 01:47:08 ericm Exp $
+# RCS: @(#) $Id: listbox.test,v 1.8 1999/11/18 02:24:41 ericm Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -941,7 +941,8 @@ test listbox-4.18 {ConfigureListbox, no listvar -> bad listvar} {
set x {this is a " bad list}
catch {.l configure -listvar x} result
list [.l get 0 end] [.l cget -listvar] $result
-} [list [list a b c d] {} "unmatched open quote in list"]
+} [list [list a b c d] {} \
+ "unmatched open quote in list: invalid listvar value"]
# No tests for DisplayListbox: I don't know how to test this procedure.
@@ -1845,9 +1846,9 @@ test listbox-21.11 {ListboxListVarProc, bad list} {
catch {unset x}
listbox .l -listvar x
set x [list a b c d]
- set x {this is a " bad list}
- set x
-} [list a b c d]
+ catch {set x {this is a " bad list}} result
+ set result
+} {can't set "x": invalid listvar value}
# UpdateHScrollbar
test listbox-22.1 {UpdateHScrollbar} {