summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2002-07-15 22:18:02 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2002-07-15 22:18:02 (GMT)
commit238c1dc36a4a340625f96ed76c46bd93872562ac (patch)
tree716557af52e29f2dec87f80a04f9b29ab62cded9 /tests
parent1d0aa1a4beb25c12aa52099b1de6c4227578333a (diff)
downloadtcl-238c1dc36a4a340625f96ed76c46bd93872562ac.zip
tcl-238c1dc36a4a340625f96ed76c46bd93872562ac.tar.gz
tcl-238c1dc36a4a340625f96ed76c46bd93872562ac.tar.bz2
* generic/tclVar.c: refactorisation to reuse already looked-up Var
pointers; definition of three new Tcl_Obj types to cache variable name parsing and lookup for later reuse; modification of internal functions to profit from the caching. * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclNamesp.c: adding CONST qualifiers to variable names passed to Tcl_FindNamespaceVar and to variable resolvers; adding CONST qualifier to the 'msg' argument to TclLookupVar. Needed to avoid code duplication in the new tclVar.c code. * tests/set-old.test: * tests/var.test: slight modification of error messages due to the modifications in the tclVar.c code.
Diffstat (limited to 'tests')
-rw-r--r--tests/set-old.test4
-rw-r--r--tests/var.test4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/set-old.test b/tests/set-old.test
index ffb6501..f860aa6 100644
--- a/tests/set-old.test
+++ b/tests/set-old.test
@@ -13,7 +13,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: set-old.test,v 1.14 2001/03/15 14:36:32 dkf Exp $
+# RCS: @(#) $Id: set-old.test,v 1.15 2002/07/15 22:18:07 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -547,7 +547,7 @@ test set-old-8.37.5 {array command, set with non-existent namespace} {
} {1 {can't set "bogusnamespace::var": parent namespace doesn't exist}}
test set-old-8.37.6 {array command, set with non-existent namespace} {
list [catch {array set bogusnamespace::var {a b}} msg] $msg
-} {1 {can't set "bogusnamespace::var(a)": parent namespace doesn't exist}}
+} {1 {can't set "bogusnamespace::var": parent namespace doesn't exist}}
test set-old-8.37.7 {array command, set with non-existent namespace} {
list [catch {array set bogusnamespace::var(0) {a b}} msg] $msg
} {1 {can't set "bogusnamespace::var(0)": variable isn't array}}
diff --git a/tests/var.test b/tests/var.test
index 916b9b4..7955c93 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.18 2001/11/09 23:06:04 dgp Exp $
+# RCS: @(#) $Id: var.test,v 1.19 2002/07/15 22:18:08 msofer Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -261,7 +261,7 @@ test var-3.9 {MakeUpvar, my var has invalid ns name} {
catch {unset aaaaa}
set aaaaa 789789
list [catch {upvar #0 aaaaa test_ns_fred::lnk} msg] $msg
-} {1 {bad variable name "test_ns_fred::lnk": unknown namespace}}
+} {1 {can't create "test_ns_fred::lnk": parent namespace doesn't exist}}
if {[info commands testgetvarfullname] != {}} {
test var-4.1 {Tcl_GetVariableName, global variable} {