diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/set.test | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/set.test b/tests/set.test index 3ac1560..0704436 100644 --- a/tests/set.test +++ b/tests/set.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: set.test,v 1.12 2007/10/15 21:27:50 dgp Exp $ +# RCS: @(#) $Id: set.test,v 1.13 2007/11/03 01:47:13 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -514,6 +514,13 @@ test set-4.6 {set command: runtime error, basic array operations} { list [catch {$z a} msg] $msg } {1 {can't read "a": variable is array}} +test set-5.1 {error on malformed array name} { + unset -nocomplain z + catch {testset2 z(a) b} msg + catch {testset2 z(b) a} msg1 + list $msg $msg1 +} {{can't read "z(a)(b)": variable isn't array} {can't read "z(b)(a)": variable isn't array}} + # cleanup catch {unset a} catch {unset b} |