diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-05-20 16:39:50 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-05-20 16:39:50 (GMT) |
| commit | f19e2665d309df5a484a53ea6d9b1098275e33db (patch) | |
| tree | 6906aa04fcb87740b514d40f1b4c83435a53a645 /tests/stringObj.test | |
| parent | 72dfeb60e23c679d2c7258db4eb9ccce0a0661fa (diff) | |
| parent | 96d441c29a2a47269655285a02c546765c163fd2 (diff) | |
| download | tcl-f19e2665d309df5a484a53ea6d9b1098275e33db.zip tcl-f19e2665d309df5a484a53ea6d9b1098275e33db.tar.gz tcl-f19e2665d309df5a484a53ea6d9b1098275e33db.tar.bz2 | |
Fix [c9663296fd]. Also refactor memory reallocation.
Diffstat (limited to 'tests/stringObj.test')
| -rw-r--r-- | tests/stringObj.test | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/stringObj.test b/tests/stringObj.test index 5b6358a..71cf63e 100644 --- a/tests/stringObj.test +++ b/tests/stringObj.test @@ -78,7 +78,7 @@ test stringObj-4.3 {Tcl_SetObjLength procedure, string gets longer} testobj { teststringobj append 1 xyzq -1 list [teststringobj length 1] [teststringobj length2 1] \ [teststringobj get 1] -} {10 20 abcdefxyzq} +} {10 15 abcdefxyzq} test stringObj-4.4 {Tcl_SetObjLength procedure, "empty string", length 0} testobj { testobj freeallvars testobj newobj 1 @@ -111,7 +111,7 @@ test stringObj-5.3 {Tcl_AppendToObj procedure, reallocating space} testobj { teststringobj append 1 abcdef -1 lappend result [teststringobj length 1] [teststringobj length2 1] \ [teststringobj get 1] -} {15 15 16 32 xy12345678abcdef} +} {15 15 16 24 xy12345678abcdef} test stringObj-6.1 {Tcl_AppendStringsToObj procedure, type conversion} testobj { testobj freeallvars @@ -142,7 +142,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 20 123abcdefg} +} {10 15 123abcdefg} test stringObj-6.6 {Tcl_AppendStringsToObj procedure, space reallocation} testobj { testobj freeallvars teststringobj set 1 abc @@ -160,7 +160,7 @@ test stringObj-6.7 {Tcl_AppendStringsToObj procedure, space reallocation} testob teststringobj appendstrings 1 34567890x list [teststringobj length 1] [teststringobj length2 1] \ [teststringobj get 1] -} {11 22 ab34567890x} +} {11 17 ab34567890x} test stringObj-6.8 {Tcl_AppendStringsToObj procedure, object totally empty} testobj { testobj freeallvars testobj newobj 1 @@ -180,7 +180,7 @@ test stringObj-7.1 {SetStringFromAny procedure} testobj { teststringobj append 1 x -1 list [teststringobj length 1] [teststringobj length2 1] \ [teststringobj get 1] -} {4 8 {a bx}} +} {4 6 {a bx}} test stringObj-7.2 {SetStringFromAny procedure, null object} testobj { testobj freeallvars testobj newobj 1 @@ -208,7 +208,7 @@ test stringObj-8.1 {DupStringInternalRep procedure} testobj { [teststringobj maxchars 1] [teststringobj get 1] \ [teststringobj length 2] [teststringobj length2 2] \ [teststringobj maxchars 2] [teststringobj get 2] -} {5 10 0 abcde 5 5 0 abcde} +} {5 8 0 abcde 5 5 0 abcde} test stringObj-8.2 {DupUnicodeInternalRep, mixed width chars} testobj { set x abc\xEF\xBF\xAEghi string length $x |
