summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-03-30 15:31:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-03-30 15:31:01 (GMT)
commitbe08ebe8c59b736ff0e850b7131987a32e799ee4 (patch)
treec13b5d2b7371720fe621cfdc4b9cf088bc242216 /tests
parent18602aa3752175c93bc985c5c13cde3f0f9fb3ee (diff)
downloadtcl-be08ebe8c59b736ff0e850b7131987a32e799ee4.zip
tcl-be08ebe8c59b736ff0e850b7131987a32e799ee4.tar.gz
tcl-be08ebe8c59b736ff0e850b7131987a32e799ee4.tar.bz2
* tests/string.test: More [string reverse] tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/string.test29
1 files changed, 28 insertions, 1 deletions
diff --git a/tests/string.test b/tests/string.test
index dbffc46..6033e57 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.61 2006/11/22 23:25:17 dkf Exp $
+# RCS: @(#) $Id: string.test,v 1.62 2007/03/30 15:31:02 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1512,6 +1512,33 @@ test string-24.4 {string reverse command - unshared string} {
set y de
string reverse $x$y
} edcba
+test string-24.5 {string reverse command - shared unicode string} {
+ set x abcde\udead
+ string reverse $x
+} \udeadedcba
+test string-24.6 {string reverse command - unshared string} {
+ set x abc
+ set y de\udead
+ string reverse $x$y
+} \udeadedcba
+test string-24.7 {string reverse command - simple case} {
+ string reverse a
+} a
+test string-24.8 {string reverse command - simple case} {
+ string reverse \udead
+} \udead
+test string-24.9 {string reverse command - simple case} {
+ string reverse {}
+} {}
+test string-24.10 {string reverse command - corner case} {
+ set x \ubeef\udead
+ string reverse $x
+} \udead\ubeef
+test string-24.11 {string reverse command - corner case} {
+ set x \ubeef
+ set y \udead
+ string reverse $x$y
+} \udead\ubeef
test string-25.1 {string is list} {
string is list {a b c}