summaryrefslogtreecommitdiffstats
path: root/tests/indexObj.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-04-06 18:57:12 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-04-06 18:57:12 (GMT)
commit9e35ea94dcd42f5e73079f336cb7cf2203d12fa0 (patch)
treecde23570e7f6028f7584c289fbc6c5741a8f3bca /tests/indexObj.test
parent3f1c1ec58cead68c012913ca28270da726ca2dcb (diff)
downloadtcl-9e35ea94dcd42f5e73079f336cb7cf2203d12fa0.zip
tcl-9e35ea94dcd42f5e73079f336cb7cf2203d12fa0.tar.gz
tcl-9e35ea94dcd42f5e73079f336cb7cf2203d12fa0.tar.bz2
* generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct): It seems
* tests/indexObj.test: there are extensions that rely on the prior * doc/GetIndex.3: behavior that the empty string cannot succeed as a unique prefix matcher, so I'm restoring Donal Fellow's solution. Added mention of this detail to the documentation. [Bug 1464039]
Diffstat (limited to 'tests/indexObj.test')
-rw-r--r--tests/indexObj.test10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/indexObj.test b/tests/indexObj.test
index 0d8a21d..c72729f 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.7.18.3 2006/04/05 15:17:06 dgp Exp $
+# RCS: @(#) $Id: indexObj.test,v 1.7.18.4 2006/04/06 18:57:30 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -75,8 +75,12 @@ test indexObj-2.8 {exact match of empty values: singleton case} {
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 1 1 {} a
-} 0
+ # NOTE this is a special case. Although the empty string is a
+ # unique prefix, we have an established history of rejecting
+ # empty lookup keys, requiring any unique prefix match to have
+ # at least one character.
+ list [catch {testindexobj 1 1 {} a} msg] $msg
+} {1 {bad token "": must be a}}
test indexObj-3.1 {cache result to skip next lookup} {
testindexobj check 42