aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-09-24 14:32:09 +1000
committerSteve Bennett <steveb@workware.net.au>2011-09-24 14:52:35 +1000
commitc84f5fcf6d341372c8dbb272f7069e3a14cd83a7 (patch)
tree37569ed5ad5e144e9237fa2ef26160c8b109de85 /tests
parent82961da831f0018c6ab177a46bd72daad32cd387 (diff)
downloadjimtcl-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.test8
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