summaryrefslogtreecommitdiffstats
path: root/tests/stringObj.test
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-09-02 16:26:33 (GMT)
committerhobbs <hobbs>1999-09-02 16:26:33 (GMT)
commitdda9412829471d1e8b6666f67ad5f9e6b74f37cf (patch)
tree4fa94ab0ae4f915245091718248d0bcce74f1e22 /tests/stringObj.test
parent8de7074c8b742a0793dfabbe010cd53d4616f0b1 (diff)
downloadtcl-dda9412829471d1e8b6666f67ad5f9e6b74f37cf.zip
tcl-dda9412829471d1e8b6666f67ad5f9e6b74f37cf.tar.gz
tcl-dda9412829471d1e8b6666f67ad5f9e6b74f37cf.tar.bz2
1999-09-01 Jeff Hobbs <hobbs@scriptics.com>
* generic/tclParseExpr.c: changed '"' to '\"' to make FreeBSD happy [Bug: 2625] * generic/tclProc.c: moved static buf to better location and changed static msg that would overflow in ProcessProcResultCode [Bug: 2483] and added Tcl_DStringFree to Tcl_ProcObjCmd. Also reworked size of static buffers. * tests/stringObj.test: added test 9.11 * generic/tclStringObj.c: changed Tcl_AppendObjToObj to properly handle the 1-byte dest and mixed src case where both had had Unicode string len checks made on them. [Bug: 2678]
Diffstat (limited to 'tests/stringObj.test')
-rw-r--r--tests/stringObj.test19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/stringObj.test b/tests/stringObj.test
index 257aa9a..cc991d3 100644
--- a/tests/stringObj.test
+++ b/tests/stringObj.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: stringObj.test,v 1.8 1999/06/26 20:55:14 rjohnson Exp $
+# RCS: @(#) $Id: stringObj.test,v 1.9 1999/09/02 16:26:38 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -299,6 +299,23 @@ test stringObj-9.10 {TclAppendObjToObj, integer src & mixed dest} {
list [testobj objtype $x] [testobj objtype $y] [append x $y] \
[set y] [testobj objtype $x] [testobj objtype $y]
} {string int abcï¿®ghi9 9 string int}
+test stringObj-9.11 {TclAppendObjToObj, mixed src & 1-byte dest index check} {
+ # bug 2678, in <=8.2.0, the second obj (the one to append) in
+ # Tcl_AppendObjToObj was not correctly checked to see if it was
+ # all one byte chars, so a unicode string would be added as one
+ # byte chars.
+ set x abcdef
+ set len [string length $x]
+ set y aübåcï
+ set len [string length $y]
+ append x $y
+ string length $x
+ set q {}
+ for {set i 0} {$i < 12} {incr i} {
+ lappend q [string index $x $i]
+ }
+ set q
+} {a b c d e f a ü b å c ï}
test stringObj-10.1 {Tcl_GetRange with all byte-size chars} {
set x "abcdef"