summaryrefslogtreecommitdiffstats
path: root/tests/string.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-11-09 16:11:46 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-11-09 16:11:46 (GMT)
commit50372ddbf9e9b93ddf9b64cad6b9380d5a542c2d (patch)
treefc51c4267eadb24af3f968b7645c15fd549e2c81 /tests/string.test
parentffd8329a24b35299d0efa9610743cc016203dc84 (diff)
downloadtcl-50372ddbf9e9b93ddf9b64cad6b9380d5a542c2d.zip
tcl-50372ddbf9e9b93ddf9b64cad6b9380d5a542c2d.tar.gz
tcl-50372ddbf9e9b93ddf9b64cad6b9380d5a542c2d.tar.bz2
Optimize for the unshared case.
Diffstat (limited to 'tests/string.test')
-rw-r--r--tests/string.test12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/string.test b/tests/string.test
index e0a96ee..6bdffb4 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.58 2006/11/09 15:37:56 dkf Exp $
+# RCS: @(#) $Id: string.test,v 1.59 2006/11/09 16:11:46 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1503,8 +1503,14 @@ test string-24.1 {string reverse command} -body {
test string-24.2 {string reverse command} -body {
string reverse a b
} -returnCodes error -result "wrong # args: should be \"string reverse string\""
-test string-24.3 {string reverse command} {
- string reverse abcde
+test string-24.3 {string reverse command - shared string} {
+ set x abcde
+ string reverse $x
+} edcba
+test string-24.4 {string reverse command - unshared string} {
+ set x abc
+ set y de
+ string reverse $x$y
} edcba
# cleanup