From be08ebe8c59b736ff0e850b7131987a32e799ee4 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 30 Mar 2007 15:31:01 +0000 Subject: * tests/string.test: More [string reverse] tests. --- ChangeLog | 4 ++++ tests/string.test | 29 ++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 730dec4..0208fd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-03-30 Don Porter + + * tests/string.test: More [string reverse] tests. + 2007-03-30 Miguel Sofer * generic/tclExecute.c: optimise the lookup of elements of indexed 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} -- cgit v0.12