summaryrefslogtreecommitdiffstats
path: root/tests/stringObj.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-02-17 17:17:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-02-17 17:17:32 (GMT)
commitf48011341a542c319bbdae8fa307edc8d5c4efa2 (patch)
tree620657126813fb4186003152a9fd78cd374bf86d /tests/stringObj.test
parent28f3aa0a8e86ea3ecd2e2699fa20fd08c6c22763 (diff)
downloadtcl-f48011341a542c319bbdae8fa307edc8d5c4efa2.zip
tcl-f48011341a542c319bbdae8fa307edc8d5c4efa2.tar.gz
tcl-f48011341a542c319bbdae8fa307edc8d5c4efa2.tar.bz2
* generic/tclStringObj.c: Factor out common GrowStringBuffer().
* generic/tclStringObj.c: Convert Tcl_AppendStringsToObj into * tests/stringObj.test: a radically simpler implementation where we just loop over calls to Tcl_AppendToObj. This fixes [Bug 2597185]. It also creates a *** POTENTIAL INCOMPATIBILITY *** in that T_ASTO can now allocate more space than is strictly required, like all the other Tcl_Append* routines. The incompatibility was detected by test stringObj-6.5, which I've updated to reflect the new behavior.
Diffstat (limited to 'tests/stringObj.test')
-rw-r--r--tests/stringObj.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/stringObj.test b/tests/stringObj.test
index 6b8e739..057d8e8 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.20 2009/02/16 04:33:10 dgp Exp $
+# RCS: @(#) $Id: stringObj.test,v 1.21 2009/02/17 17:17:32 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -136,7 +136,7 @@ test stringObj-6.5 {Tcl_AppendStringsToObj procedure, don't double space if init
testobj newobj 1
teststringobj appendstrings 1 123 abcdefg
list [teststringobj length 1] [teststringobj length2 1] [teststringobj get 1]
-} {10 10 123abcdefg}
+} {10 20 123abcdefg}
test stringObj-6.6 {Tcl_AppendStringsToObj procedure, space reallocation} testobj {
testobj freeallvars
teststringobj set 1 abc