diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2004-09-14 17:45:24 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2004-09-14 17:45:24 (GMT) |
commit | 807dad29a3e4ffb856a0814751efc851f5d6bfbe (patch) | |
tree | a10ee71554e5e45668b3ad9d290d1e7f0b1e4a18 /tests | |
parent | 8cb023658d6e613c6a76db26b0b5568b6e0b2bb6 (diff) | |
download | tcl-807dad29a3e4ffb856a0814751efc851f5d6bfbe.zip tcl-807dad29a3e4ffb856a0814751efc851f5d6bfbe.tar.gz tcl-807dad29a3e4ffb856a0814751efc851f5d6bfbe.tar.bz2 |
* doc/interp.n:
* generic/tclInterp.c (TclPreventAliasLoop, AliasCreate):
* tests/interp.test (17.4-6, 19.3-4): fixing problems with
renaming of aliases [Bugs 707104 1026493]. Fix designed by dgp.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/interp.test | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/interp.test b/tests/interp.test index 1cda10a..3909ef1 100644 --- a/tests/interp.test +++ b/tests/interp.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: interp.test,v 1.40 2004/08/18 19:59:08 kennykb Exp $ +# RCS: @(#) $Id: interp.test,v 1.41 2004/09/14 17:45:37 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -662,14 +662,21 @@ test interp-17.4 {alias loop prevention} { interp create x interp alias x b x a list [catch {x eval rename b a} msg] $msg -} {1 {cannot define or rename alias "b": would create a loop}} +} {1 {cannot define or rename alias "a": would create a loop}} test interp-17.5 {alias loop prevention} { catch {interp delete x} interp create x x alias z l1 interp alias {} l2 x z list [catch {rename l2 l1} msg] $msg -} {1 {cannot define or rename alias "l2": would create a loop}} +} {1 {cannot define or rename alias "l1": would create a loop}} +test interp-17.6 {alias loop prevention} { + catch {interp delete x} + interp create x + interp alias x a x b + x eval rename a c + list [catch {x eval rename c b} msg] $msg +} {1 {cannot define or rename alias "b": would create a loop}} # # Test robustness of Tcl_DeleteInterp when applied to a slave interpreter. @@ -788,7 +795,7 @@ test interp-19.3 {alias deletion} { catch {interp eval a foo} msg interp delete a set msg -} {invalid command name "zop"} +} {invalid command name "bar"} test interp-19.4 {alias deletion} { catch {interp delete a} interp create a @@ -817,7 +824,7 @@ test interp-19.6 {alias deletion} { set s [interp aliases a] interp delete a set s -} foo +} {::foo foo} test interp-19.7 {alias deletion, renaming} { catch {interp delete a} interp create a |