summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-04-05 15:16:46 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-04-05 15:16:46 (GMT)
commit729b47be45a702ff78180857ffeaa1e7ce2c0de5 (patch)
tree667b3d1bc8a2e6c36298009343029b89ddd38dfd /tests
parent1fbc814589c815aba033653af3694fc122ce1538 (diff)
downloadtcl-729b47be45a702ff78180857ffeaa1e7ce2c0de5.zip
tcl-729b47be45a702ff78180857ffeaa1e7ce2c0de5.tar.gz
tcl-729b47be45a702ff78180857ffeaa1e7ce2c0de5.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')
-rw-r--r--tests/binary.test6
-rw-r--r--tests/indexObj.test7
2 files changed, 8 insertions, 5 deletions
diff --git a/tests/binary.test b/tests/binary.test
index f792dd8..fb137db 100644
--- a/tests/binary.test
+++ b/tests/binary.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: binary.test,v 1.11.2.3 2005/09/27 15:44:13 dkf Exp $
+# RCS: @(#) $Id: binary.test,v 1.11.2.4 2006/04/05 15:17:06 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1460,9 +1460,9 @@ test binary-41.8 {ScanNumber: word alignment} {nonPortable pcOnly} {
} {2 1 1.6}
test binary-42.1 {Tcl_BinaryObjCmd: bad arguments} {} {
- catch {binary ""} result
+ catch {binary ?} result
set result
-} {bad option "": must be format or scan}
+} {bad option "?": must be format or scan}
# Wide int (guaranteed at least 64-bit) handling
test binary-43.1 {Tcl_BinaryObjCmd: format wide int} {} {
diff --git a/tests/indexObj.test b/tests/indexObj.test
index 168b225..0d8a21d 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.2 2006/04/05 13:20:14 dkf Exp $
+# RCS: @(#) $Id: indexObj.test,v 1.7.18.3 2006/04/05 15:17:06 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -72,8 +72,11 @@ test indexObj-2.7 {exact match of empty values} {
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} {
- 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 1 1 {} a
+} 0
test indexObj-3.1 {cache result to skip next lookup} {
testindexobj check 42