diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2006-01-23 11:48:25 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2006-01-23 11:48:25 (GMT) |
commit | 896bde52130e400c7a023c128d609664b290ab3b (patch) | |
tree | d550df8524661b7913caf74f5590b0d761d14b35 | |
parent | 81f0f7d83c0d31ad950d4d757b3e12848859d980 (diff) | |
download | tcl-896bde52130e400c7a023c128d609664b290ab3b.zip tcl-896bde52130e400c7a023c128d609664b290ab3b.tar.gz tcl-896bde52130e400c7a023c128d609664b290ab3b.tar.bz2 |
added test for [Bug 1410553]
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tests/string.test | 12 |
2 files changed, 15 insertions, 3 deletions
@@ -1,7 +1,9 @@ 2006-01-23 Miguel Sofer <msofer@users.sf.net> - * generic/tclStringObj.c: fixed incorrect handling of internal rep - in Tcl_GetRange [Bug 1410553]. Thanks to twylite and Peter Spjuth. + * generic/tclStringObj.c (Tcl_GetRange): + * tests/stringTest (string-12.21):fixed incorrect handling of + internal rep in Tcl_GetRange [Bug 1410553]. Thanks to twylite and + Peter Spjuth. 2006-01-16 Reinhard Max <max@suse.de> diff --git a/tests/string.test b/tests/string.test index ec730b7..8548c31 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.5 2005/05/11 00:48:01 hobbs Exp $ +# RCS: @(#) $Id: string.test,v 1.36.2.6 2006/01/23 11:48:25 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1052,6 +1052,16 @@ test string-12.19 {string range, bytearray object} { test string-12.20 {string range, out of bounds indices} { string range \u00ff 0 1 } \u00ff +test string-12.21 {string range, unicode, bug 1410553} { + set buf {} + foreach ch "\x00 \x03 \x41" { + append buf $ch + if {$ch == "\x03"} { + string length $buf + } + } + expr {[string range $buf end-1 end] eq "\x03\x41"} +} 1 test string-13.1 {string repeat} { list [catch {string repeat} msg] $msg |