summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2018-11-09 14:13:15 (GMT)
committersebres <sebres@users.sourceforge.net>2018-11-09 14:13:15 (GMT)
commit75399e97a85433a3805da49a5a11350610a369ae (patch)
tree44e5f23c38d97998f8315e7e136053cf89deed87
parent54713545714ae9ba3d1815ce5dc99ec4b6386e0b (diff)
downloadtcl-75399e97a85433a3805da49a5a11350610a369ae.zip
tcl-75399e97a85433a3805da49a5a11350610a369ae.tar.gz
tcl-75399e97a85433a3805da49a5a11350610a369ae.tar.bz2
test case to cover bug [35a8f1c04a]
-rw-r--r--tests/list.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/list.test b/tests/list.test
index 5a002a9..56414f7 100644
--- a/tests/list.test
+++ b/tests/list.test
@@ -108,6 +108,21 @@ test list-3.1 {SetListFromAny and lrange/concat results} {
test list-4.1 {Bug 3173086} {
string is list "{[list \\\\\}]}"
} 1
+test list-4.2 {Bug 35a8f1c04a, check correct str-rep} {
+ set result {}
+ foreach i {
+ {#"} {#"""} {#"""""""""""""""}
+ "#\"{" "#\"\"\"{" "#\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\{"
+ "#\"}" "#\"\"\"}" "#\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\}"
+ } {
+ set list [list $i]
+ set list [string trim " $list "]
+ if {[llength $list] > 1 || $i ne [lindex $list 0]} {
+ lappend result "wrong string-representation of list by '$i', length: [llength $list], list: '$list'"
+ }
+ }
+ set result [join $result \n]
+} {}
# cleanup
::tcltest::cleanupTests