diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-09-24 14:32:09 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-09-24 14:52:35 +1000 |
commit | c84f5fcf6d341372c8dbb272f7069e3a14cd83a7 (patch) | |
tree | 37569ed5ad5e144e9237fa2ef26160c8b109de85 /tests | |
parent | 82961da831f0018c6ab177a46bd72daad32cd387 (diff) | |
download | jimtcl-c84f5fcf6d341372c8dbb272f7069e3a14cd83a7.zip jimtcl-c84f5fcf6d341372c8dbb272f7069e3a14cd83a7.tar.gz jimtcl-c84f5fcf6d341372c8dbb272f7069e3a14cd83a7.tar.bz2 |
Fix script ignored string rep after list operation
Even if a string has list rep internally,
the original string rep (if there is one) should be used when evaluated
as a script.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/misc.test | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/misc.test b/tests/misc.test index c5a389e..5a851bc 100644 --- a/tests/misc.test +++ b/tests/misc.test @@ -546,4 +546,12 @@ test exprerr-1.1 {Error message with bad expr} { set msg } {Expression has bad operands to ||} +test eval-list-1.1 {Lost string rep with list} { + set x {set y 1; incr y} + # Convert to list rep internally + lindex $x 4 + # But make sure we don't lost the original string rep + list [catch $x] $y +} {0 2} + testreport |