summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-01-23 11:42:23 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-01-23 11:42:23 (GMT)
commit94e3d0ea14f26a1b809ae21a88a2d691185d819a (patch)
tree8157dfea43a7fb32702332d93536f458abb1e3ae
parent5797180be8dc50f5539d7262da04e069b8c4a726 (diff)
downloadtcl-94e3d0ea14f26a1b809ae21a88a2d691185d819a.zip
tcl-94e3d0ea14f26a1b809ae21a88a2d691185d819a.tar.gz
tcl-94e3d0ea14f26a1b809ae21a88a2d691185d819a.tar.bz2
Added test for [Bug 1410553]
-rw-r--r--ChangeLog37
-rw-r--r--tests/string.test18
2 files changed, 38 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ca6bd5..dc9ba33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,22 +1,27 @@
+2006-01-23 Donal K. Fellows <dkf@users.sf.net>
+
+ * tests/string.test (string-12.21): Added test for [Bug 1410553] based
+ on original bug report.
+
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: fixed incorrect handling of internal rep in
+ Tcl_GetRange [Bug 1410553]. Thanks to twylite and Peter Spjuth.
- * generic/tclProc.c: fixed args handling for precompiled bodies
- [Bug 1412695]; thanks to Uwe Traum.
+ * generic/tclProc.c: fixed args handling for precompiled bodies [Bug
+ 1412695]; thanks to Uwe Traum.
2006-01-16 Reinhard Max <max@suse.de>
- * generic/tclPipe.c (FileForRedirect): Prevent nameString from
- being freed without having been initialized.
- * tests/exec.test: Added a test for the above.
+ * generic/tclPipe.c (FileForRedirect): Prevent nameString from being
+ freed without having been initialized.
+ * tests/exec.test: Added a test for the above.
2006-01-12 Zoran Vasiljevic <vasiljevic@users.sourceforge.net>
- * generic/tclPathObj.c (Tcl_FSGetInternalRep): backported
- patch from core-8-4-branch. A freed pointer has been
- overwritten causing all sorts of coredumps.
+ * generic/tclPathObj.c (Tcl_FSGetInternalRep): backported patch from
+ core-8-4-branch. A freed pointer has been overwritten causing all
+ sorts of coredumps.
2006-01-12 Vince Darley <vincentdarley@sourceforge.net>
@@ -37,15 +42,15 @@
* unix/configure: add caching, use AC_CACHE_CHECK instead of
* unix/configure.in: AC_CACHE_VAL where possible, consistent message
- * unix/tcl.m4: quoting, sync relevant tclconfig/tcl.m4 changes and
- gratuitous formatting differences, fix SC_CONFIG_MANPAGES with default
- argument, Darwin improvements to SC_LOAD_*CONFIG.
+ * unix/tcl.m4: quoting, sync relevant tclconfig/tcl.m4 changes
+ and gratuitous formatting differences, fix SC_CONFIG_MANPAGES with
+ default argument, Darwin improvements to SC_LOAD_*CONFIG.
2006-01-09 Don Porter <dgp@users.sourceforge.net>
- * generic/tclNamesp.c (NamespaceInscopeCmd): [namespace inscope]
- * tests/namespace.test: commands were not reported by [info level]
- [Bug 1400572].
+ * generic/tclNamesp.c (NamespaceInscopeCmd): [namespace inscope]
+ * tests/namespace.test: commands were not reported by [info level]
+ [Bug 1400572].
2006-01-09 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
diff --git a/tests/string.test b/tests/string.test
index a461a5e..c23a200 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.55 2005/12/19 19:03:17 dgp Exp $
+# RCS: @(#) $Id: string.test,v 1.56 2006/01/23 11:42:23 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1109,6 +1109,22 @@ test string-12.19 {string range, bytearray object} {
test string-12.20 {string range, out of bounds indices} {
string range \u00ff 0 1
} \u00ff
+# Bug 1410553
+test string-12.21 {string range, regenerates correct reps} {
+ set bytes "\x00 \x03 \x41"
+ set rxBuffer {}
+ foreach ch $bytes {
+ append rxBuffer $ch
+ if {$ch eq "\x03"} {
+ string length $rxBuffer
+ }
+ }
+ set rxCRC [string range $rxBuffer end-1 end]
+ binary scan [join $bytes {}] "H*" input_hex
+ binary scan $rxBuffer "H*" rxBuffer_hex
+ binary scan $rxCRC "H*" rxCRC_hex
+ list $input_hex $rxBuffer_hex $rxCRC_hex
+} {000341 000341 0341}
test string-13.1 {string repeat} {
list [catch {string repeat} msg] $msg