summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-10-08 22:44:49 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-10-08 22:44:49 (GMT)
commit978b1c10b76aed1e7c18d325b3f25cfa9a4fcb0d (patch)
treed69f1e02d383bb9a9b3a1ba3cbc3f5666ba1b4a4
parent435b2f0430293700795f70f619053e29dee68eaf (diff)
downloadtcl-978b1c10b76aed1e7c18d325b3f25cfa9a4fcb0d.zip
tcl-978b1c10b76aed1e7c18d325b3f25cfa9a4fcb0d.tar.gz
tcl-978b1c10b76aed1e7c18d325b3f25cfa9a4fcb0d.tar.bz2
Fix things so we can pass our own test suite for TIP#212...
-rw-r--r--generic/tclDictObj.c6
-rw-r--r--tests/dict.test12
2 files changed, 9 insertions, 9 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index 9fadc83..5863cd2 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclDictObj.c,v 1.22 2004/10/08 15:05:05 dkf Exp $
+ * RCS: @(#) $Id: tclDictObj.c,v 1.23 2004/10/08 22:44:49 dkf Exp $
*/
#include "tclInt.h"
@@ -2787,7 +2787,7 @@ DictUpdateCmd(interp, objc, objv)
dictPtr = Tcl_ObjGetVar2(interp, objv[2], NULL, 0);
if (dictPtr == NULL) {
- return TCL_OK;
+ return result;
}
/*
@@ -2825,7 +2825,7 @@ DictUpdateCmd(interp, objc, objv)
*/
if (Tcl_ObjSetVar2(interp, objv[2], NULL, dictPtr,
- TCL_LEAVE_ERR_MSG) != TCL_OK) {
+ TCL_LEAVE_ERR_MSG) == NULL) {
Tcl_DiscardResult(&sr);
if (allocdict) {
TclDecrRefCount(dictPtr);
diff --git a/tests/dict.test b/tests/dict.test
index b8ad05d..c1004eb 100644
--- a/tests/dict.test
+++ b/tests/dict.test
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: dict.test,v 1.10 2004/10/08 21:10:36 dkf Exp $
+# RCS: @(#) $Id: dict.test,v 1.11 2004/10/08 22:44:49 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -959,14 +959,14 @@ test dict-21.11 {dict update command} {
dict update a b v1 d v2 {
dict set a f g
}
- getOrder a b d f
+ getOrder $a b d f
} {b c d e f g 3}
test dict-21.12 {dict update command} {
set a {b c d e}
dict update a b v1 d v2 f v3 {
set v3 g
}
- getOrder a b d f
+ getOrder $a b d f
} {b c d e f g 3}
test dict-22.1 {dict with command} -body {
@@ -976,12 +976,12 @@ test dict-22.2 {dict with command} -body {
dict with v
} -returnCodes 1 -result {wrong # args: should be "dict with dictVar ?key ...? script"}
test dict-22.3 {dict with command} -body {
- catch {unset v}
+ unset -nocomplain v
dict with v {error "in body"}
} -returnCodes 1 -result {can't read "v": no such variable}
test dict-22.4 {dict with command} {
set a {b c d e}
- catch {unset b d}
+ unset -nocomplain b d
set result [list [info exist b] [info exist d]]
dict with a {
lappend result [info exist b] [info exist d] $b $d
@@ -1009,7 +1009,7 @@ test dict-22.7 {dict with command} {
dict with a {
dict unset a b
}
- getOrder a b d
+ getOrder $a b d
} {b c d e 2}
test dict-22.8 {dict with command} {
set a [dict create b c]