summaryrefslogtreecommitdiffstats
path: root/tests/var.test
diff options
context:
space:
mode:
authorredman <redman>1999-07-22 21:50:53 (GMT)
committerredman <redman>1999-07-22 21:50:53 (GMT)
commit56b77d9d6c418f3dee04f0b31834ad76e69e11dd (patch)
treed6278f0ac3e8f40fdef3bbed06f35b3868fbb00f /tests/var.test
parent41b1b6389d0f6a7a65410e66d85f909e6f855148 (diff)
downloadtcl-56b77d9d6c418f3dee04f0b31834ad76e69e11dd.zip
tcl-56b77d9d6c418f3dee04f0b31834ad76e69e11dd.tar.gz
tcl-56b77d9d6c418f3dee04f0b31834ad76e69e11dd.tar.bz2
* Changed version to 8.2b2.
* win/tclWinPort.h: Block out include of sys/*.h in order to build extensions with MetroWerks compiler for Win32. [Bug: 2385] * generic/tclCmdMZ.c: * generic/tclIO.c: Fix ANSI-style prototypes based on patch from Ulrich Ring. [Bug: 2391] * unix/Makefile.in: Need to make install-sh executable before calling (with chmod +x). [Bug: 2413] * tests/var.test: * generic/tclVar.c: Fixed bug that caused a seg. fault when using "array set a(b) {}", which is a bad array name anyway. Now the "array set" command will return an error in this case. Added test case and fixed existing test. [Bug: 2427]
Diffstat (limited to 'tests/var.test')
-rw-r--r--tests/var.test9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/var.test b/tests/var.test
index de08a35..d9d0fe0 100644
--- a/tests/var.test
+++ b/tests/var.test
@@ -14,7 +14,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: var.test,v 1.7 1999/06/26 20:55:17 rjohnson Exp $
+# RCS: @(#) $Id: var.test,v 1.8 1999/07/22 21:50:55 redman Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -577,7 +577,12 @@ test var-9.12 {behaviour of TclSetVar write trace error} {
test var-10.1 {can't nest arrays with array set} {
catch {unset arr}
list [catch {array set arr(x) {a 1 b 2}} res] $res
-} {1 {can't set "arr(x)(a)": variable isn't array}}
+} {1 {can't set "arr(x)": variable isn't array}}
+
+test var-10.2 {can't nest arrays with array set} {
+ catch {unset arr}
+ list [catch {array set arr(x) {}} res] $res
+} {1 {can't set "arr(x)": variable isn't array}}
catch {namespace delete ns}
catch {unset arr}