summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-07-04 10:30:27 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-07-04 10:30:27 (GMT)
commit81b15600f5cee6d721bd157eef9347bfab1521fe (patch)
treea0d2ff8e14d59d5e8552430f44e0ceee0837acaa /tests
parent9ef344f3f4c962cb0710eabd4bdbca23381e8088 (diff)
downloadtcl-81b15600f5cee6d721bd157eef9347bfab1521fe.zip
tcl-81b15600f5cee6d721bd157eef9347bfab1521fe.tar.gz
tcl-81b15600f5cee6d721bd157eef9347bfab1521fe.tar.bz2
[string map] now can take dictionaries for maps but the condition for doing so
is deeply tricky. [Bug 759936]
Diffstat (limited to 'tests')
-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