diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-10-22 15:39:58 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-10-22 15:39:58 (GMT) |
commit | a14cd9979de8b9856c979aae40f3c8889b2d8d9b (patch) | |
tree | a045c04ec4a4410e0f5a548ea98550340520b1af /tests | |
parent | 0fca0c346fbe4fb05578bffffc93048a9e0db914 (diff) | |
download | tcl-a14cd9979de8b9856c979aae40f3c8889b2d8d9b.zip tcl-a14cd9979de8b9856c979aae40f3c8889b2d8d9b.tar.gz tcl-a14cd9979de8b9856c979aae40f3c8889b2d8d9b.tar.bz2 |
Let [$obj varname x(y)] work. [Bug 2883857]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/oo.test | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/oo.test b/tests/oo.test index 829c8ce..a976a7d 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.29 2009/06/24 15:29:40 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.30 2009/10/22 15:39:58 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1626,6 +1626,17 @@ test oo-19.1 {OO: varname method} -setup { inst destroy rename foo {} } -result {{x {} write} ok ok 0} +test oo-19.2 {OO: varname method: Bug 2883857} -setup { + oo::class create SpecialClass + oo::objdefine SpecialClass export createWithNamespace + SpecialClass createWithNamespace inst ::oo_test + oo::objdefine inst export varname eval +} -body { + inst eval { variable x; array set x {y z} } + inst varname x(y) +} -cleanup { + SpecialClass destroy +} -result ::oo_test::x(y) test oo-20.1 {OO: variable method} -body { oo::class create testClass { |