diff options
author | dgp <dgp@users.sourceforge.net> | 2006-04-05 15:17:37 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2006-04-05 15:17:37 (GMT) |
commit | 1aa54c04958fb5a081acbd1440314021b21ca394 (patch) | |
tree | 4f7d720b80a5b9e2bf3554c2d14d3981fe3e8b5a /tests/indexObj.test | |
parent | 04756a2aabf90528f4c03ce5f69e76ac056ded7a (diff) | |
download | tcl-1aa54c04958fb5a081acbd1440314021b21ca394.zip tcl-1aa54c04958fb5a081acbd1440314021b21ca394.tar.gz tcl-1aa54c04958fb5a081acbd1440314021b21ca394.tar.bz2 |
* generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct): Allow empty
strings to be matched by the Tcl_GetIndexFromObj machinery, in
the same manner as any other key. [Bug 1464039]
Diffstat (limited to 'tests/indexObj.test')
-rw-r--r-- | tests/indexObj.test | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/indexObj.test b/tests/indexObj.test index acffdcc..653275a 100644 --- a/tests/indexObj.test +++ b/tests/indexObj.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: indexObj.test,v 1.12 2006/04/05 13:18:25 dkf Exp $ +# RCS: @(#) $Id: indexObj.test,v 1.13 2006/04/05 15:17:39 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -67,8 +67,11 @@ test indexObj-2.7 {exact match of empty values} testindexobj { list [catch {testindexobj 1 1 {} a b c} msg] $msg } {1 {ambiguous token "": must be a, b, or c}} test indexObj-2.8 {exact match of empty values: singleton case} testindexobj { - list [catch {testindexobj 1 1 {} a} msg] $msg + list [catch {testindexobj 1 0 {} a} msg] $msg } {1 {bad token "": must be a}} +test indexObj-2.9 {non-exact match of empty values: singleton case} testindexobj { + testindexobj 1 1 {} a +} 0 test indexObj-3.1 {cache result to skip next lookup} testindexobj { testindexobj check 42 |