diff options
author | hobbs <hobbs@noemail.net> | 1999-09-02 16:26:32 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 1999-09-02 16:26:32 (GMT) |
commit | 8f22641cbb64a19821a1bfb21897d45544435d47 (patch) | |
tree | 4fa94ab0ae4f915245091718248d0bcce74f1e22 /tests | |
parent | 65839a9f45f548713fb9e17b8bf36f230254ab98 (diff) | |
download | tcl-8f22641cbb64a19821a1bfb21897d45544435d47.zip tcl-8f22641cbb64a19821a1bfb21897d45544435d47.tar.gz tcl-8f22641cbb64a19821a1bfb21897d45544435d47.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]
FossilOrigin-Name: dc02bb24c964af4716603ae9d14a3325d3ff77ea
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stringObj.test | 19 |
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" |