summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-05-11 00:47:58 (GMT)
committerhobbs <hobbs>2005-05-11 00:47:58 (GMT)
commit8bcd5484836bddde955023ae76b23f0a78357033 (patch)
tree20cf32589c9bd8370a01cc925f44664124992138 /tests
parent8875f24d634bf125138e65e7dc33d134f8c8bf32 (diff)
downloadtcl-8bcd5484836bddde955023ae76b23f0a78357033.zip
tcl-8bcd5484836bddde955023ae76b23f0a78357033.tar.gz
tcl-8bcd5484836bddde955023ae76b23f0a78357033.tar.bz2
* tests/string.test: string-10.[21-30]
* generic/tclCmdMZ.c (Tcl_StringObjCmd): add extra checks to prevent possible UMR in unichar cmp function for string map.
Diffstat (limited to 'tests')
-rw-r--r--tests/string.test32
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/string.test b/tests/string.test
index 71e94ec..ec730b7 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.36.2.4 2005/04/22 16:30:10 dgp Exp $
+# RCS: @(#) $Id: string.test,v 1.36.2.5 2005/05/11 00:48:01 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -766,6 +766,36 @@ test string-10.20 {string map, nasty sharing crash from [Bug 1018562]} {
set a {a b}
string map $a $a
} {b b}
+test string-10.21 {string map, ABR checks} {
+ string map {longstring foob} long
+} long
+test string-10.22 {string map, ABR checks} {
+ string map {long foob} long
+} foob
+test string-10.23 {string map, ABR checks} {
+ string map {lon foob} long
+} foobg
+test string-10.24 {string map, ABR checks} {
+ string map {lon foob} longlo
+} foobglo
+test string-10.25 {string map, ABR checks} {
+ string map {lon foob} longlon
+} foobgfoob
+test string-10.26 {string map, ABR checks} {
+ string map {longstring foob longstring bar} long
+} long
+test string-10.27 {string map, ABR checks} {
+ string map {long foob longstring bar} long
+} foob
+test string-10.28 {string map, ABR checks} {
+ string map {lon foob longstring bar} long
+} foobg
+test string-10.29 {string map, ABR checks} {
+ string map {lon foob longstring bar} longlo
+} foobglo
+test string-10.30 {string map, ABR checks} {
+ string map {lon foob longstring bar} longlon
+} foobgfoob
test string-11.1 {string match, too few args} {
list [catch {string match a} msg] $msg