summaryrefslogtreecommitdiffstats
path: root/tests/string.test
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2004-08-30 18:06:31 (GMT)
committerdkf <dkf@noemail.net>2004-08-30 18:06:31 (GMT)
commitbf6c3bbe6b29f81c590d30db36c5608d50a7436c (patch)
treeef77a0abbea975f1607d25e74f06e1f3eae603b1 /tests/string.test
parent4bd98b3397a13304c19c4b622f406403a77dd4f3 (diff)
downloadtcl-bf6c3bbe6b29f81c590d30db36c5608d50a7436c.zip
tcl-bf6c3bbe6b29f81c590d30db36c5608d50a7436c.tar.gz
tcl-bf6c3bbe6b29f81c590d30db36c5608d50a7436c.tar.bz2
Fix a crash caused by sharing in [string map]. [Bug 1018562]
FossilOrigin-Name: ee48b7f3599e49aad8899329eec399a172961e64
Diffstat (limited to 'tests/string.test')
-rw-r--r--tests/string.test6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/string.test b/tests/string.test
index 4021feb..b80d223 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: string.test,v 1.41 2004/06/30 12:34:36 dkf Exp $
+# RCS: @(#) $Id: string.test,v 1.42 2004/08/30 18:06:34 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -808,6 +808,10 @@ test string-10.20 {string map, dictionaries can alter map ordering} {
set map {aa X a Y}
list [string map [dict create aa X a Y] aaa] [string map $map aaa] [dict size $map] [string map $map aaa]
} {YYY XY 2 XY}
+test string-10.21 {string map, nasty sharing crash from [Bug 1018562]} {
+ set a {a b}
+ string map $a $a
+} {b b}
test string-11.1 {string match, too few args} {
list [catch {string match a} msg] $msg