summaryrefslogtreecommitdiffstats
path: root/tests/string.test
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2003-07-04 10:30:27 (GMT)
committerdkf <dkf@noemail.net>2003-07-04 10:30:27 (GMT)
commitba2158f556a328c23cb2a52c55b7e933238b7433 (patch)
treea0d2ff8e14d59d5e8552430f44e0ceee0837acaa /tests/string.test
parent9cf3d6e90f116f55123056f60713d790f724ac06 (diff)
downloadtcl-ba2158f556a328c23cb2a52c55b7e933238b7433.zip
tcl-ba2158f556a328c23cb2a52c55b7e933238b7433.tar.gz
tcl-ba2158f556a328c23cb2a52c55b7e933238b7433.tar.bz2
[string map] now can take dictionaries for maps but the condition for doing so
is deeply tricky. [Bug 759936] FossilOrigin-Name: c40ffcd834d111088d971680841151443ff93fdd
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 40e84ed..083e145 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.38 2003/06/09 21:51:37 dgp Exp $
+# RCS: @(#) $Id: string.test,v 1.39 2003/07/04 10:30:27 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -760,6 +760,10 @@ test string-10.18 {string map, empty argument} {
test string-10.19 {string map, empty arguments} {
string map -nocase {{} abc f bar {} def} foo
} baroo
+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-11.1 {string match, too few args} {
list [catch {string match a} msg] $msg