diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tests/string.test | 7 |
2 files changed, 11 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2011-08-27 Don Porter <dgp@users.sourceforge.net> + + * generic/tclStringObj.c: [RFE 3396731] Revise the [string reverse] + * tests/string.test: implementation to operate on the representation + that comes in, avoid conversion to other reps. + 2011-08-23 Don Porter <dgp@users.sourceforge.net> * generic/tclIORChan.c: [Bug 3396948] Leak of ReflectedChannelMap. diff --git a/tests/string.test b/tests/string.test index e53504f..85a7372 100644 --- a/tests/string.test +++ b/tests/string.test @@ -1623,11 +1623,14 @@ test string-24.12 {string reverse command - corner case} { set y \udead string is ascii [string reverse $x$y] } 0 -test string-24.13 {string reverse command - pure bytearray} { +test string-24.13 {string reverse command - pure Unicode string} { + string reverse [string range \ubeef\udead\ubeef\udead\ubeef\udead 1 5] +} \udead\ubeef\udead\ubeef\udead +test string-24.14 {string reverse command - pure bytearray} { binary scan [string reverse [binary format H* 010203]] H* x set x } 030201 -test string-24.14 {string reverse command - pure bytearray} { +test string-24.15 {string reverse command - pure bytearray} { binary scan [tcl::string::reverse [binary format H* 010203]] H* x set x } 030201 |