summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/basic.test4
-rw-r--r--tests/lrange.test10
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/basic.test b/tests/basic.test
index 865814a..137ad53 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -962,6 +962,10 @@ test basic-48.23.$noComp {expansion: handle return codes} -constraints $constrai
unset res t
} -result {0 10 1 Hejsan}
+test basic-48.24.$noComp {expansion: empty not canonical list, regression test, bug [cc1e91552c]} $constraints {
+ run {list [list {*}{ }] [list {*}[format %c 32]] [list {*}[set a { }]]}
+} [lrepeat 3 {}]
+
} ;# End of noComp loop
test basic-49.1 {Tcl_EvalEx: verify TCL_EVAL_GLOBAL operation} testevalex {
diff --git a/tests/lrange.test b/tests/lrange.test
index ba10354..4ba645d 100644
--- a/tests/lrange.test
+++ b/tests/lrange.test
@@ -108,6 +108,16 @@ test lrange-3.6 {compiled with calculated indices, end out of range (after end)}
list [lrange {a b c} 1 end+1] [lrange {a b c} 1+0 2+1] [lrange {a b c} 1 end+1] [lrange {a b c} end-1 3+1]
} [lrepeat 4 {b c}]
+test lrange-3.7a {compiled on empty not canonical list (with static and dynamic indices), regression test, bug [cc1e91552c]} {
+ list [lrange { } 0 1] [lrange [format %c 32] 0 1] [lrange [set a { }] 0 1] \
+ [lrange { } 0-1 end+1] [lrange [format %c 32] 0-1 end+1] [lrange $a 0-1 end+1]
+} [lrepeat 6 {}]
+test lrange-3.7b {not compiled on empty not canonical list (with static and dynamic indices), regression test, bug [cc1e91552c]} {
+ set cmd lrange
+ list [$cmd { } 0 1] [$cmd [format %c 32] 0 1] [$cmd [set a { }] 0 1] \
+ [$cmd { } 0-1 end+1] [$cmd [format %c 32] 0-1 end+1] [$cmd $a 0-1 end+1]
+} [lrepeat 6 {}]
+
# cleanup
::tcltest::cleanupTests