summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2024-08-19 08:49:26 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2024-08-19 08:49:26 (GMT)
commit22a3d17d0df80cc380166516f4f6dadddcfb8bd5 (patch)
treeb1b485316248d05c479266d9b9d777b3f639c20f /generic
parent33fcf01a622ce460dd628a489b1930e90db72a46 (diff)
parent9d36cc55cd2b92193b96f1c100c68dcf3f21a826 (diff)
downloadtcl-22a3d17d0df80cc380166516f4f6dadddcfb8bd5.zip
tcl-22a3d17d0df80cc380166516f4f6dadddcfb8bd5.tar.gz
tcl-22a3d17d0df80cc380166516f4f6dadddcfb8bd5.tar.bz2
Beef up encoding tests for fragmented and split encodings
Diffstat (limited to 'generic')
-rw-r--r--generic/tclTest.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 9a7fa39..6c25770 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -2073,7 +2073,7 @@ static void SpecialFree(
* encodingname srcbytes flags state dstlen ?srcreadvar? ?dstwrotevar? ?dstcharsvar?
*
* Results:
- * TCL_OK or TCL_ERROR. This any errors running the test, NOT the
+ * TCL_OK or TCL_ERROR. This indicates any errors running the test, NOT the
* result of Tcl_UtfToExternal or Tcl_ExternalToUtf.
*
* Side effects:
@@ -2084,10 +2084,9 @@ static void SpecialFree(
* entire output buffer, not just the part containing the decoded
* portion. This allows for additional checks at test script level.
*
- * If any of the srcreadvar, dstwrotevar and
- * dstcharsvar are specified and not empty, they are treated as names
- * of variables where the *srcRead, *dstWrote and *dstChars output
- * from the functions are stored.
+ * If any of the srcreadvar, dstwrotevar and dstcharsvar are specified and
+ * not empty, they are treated as names of variables where the *srcRead,
+ * *dstWrote and *dstChars output from the functions are stored.
*
* The function also checks internally whether nuls are correctly
* appended as requested but the TCL_ENCODING_NO_TERMINATE flag
@@ -2121,9 +2120,9 @@ static int UtfExtWrapper(
{"end", TCL_ENCODING_END},
{"noterminate", TCL_ENCODING_NO_TERMINATE},
{"charlimit", TCL_ENCODING_CHAR_LIMIT},
- {"profiletcl8", TCL_ENCODING_PROFILE_TCL8},
- {"profilestrict", TCL_ENCODING_PROFILE_STRICT},
- {"profilereplace", TCL_ENCODING_PROFILE_REPLACE},
+ {"tcl8", TCL_ENCODING_PROFILE_TCL8},
+ {"strict", TCL_ENCODING_PROFILE_STRICT},
+ {"replace", TCL_ENCODING_PROFILE_REPLACE},
{NULL, 0}
};
Tcl_Size i;
@@ -2220,9 +2219,10 @@ static int UtfExtWrapper(
&dstWrote,
dstCharsVar ? &dstChars : NULL);
if (memcmp(bufPtr + bufLen - 4, "\xAB\xCD\xEF\xAB", 4)) {
- Tcl_SetResult(interp,
- "Tcl_ExternalToUtf wrote past output buffer",
- TCL_STATIC);
+ Tcl_SetObjResult(interp,
+ Tcl_ObjPrintf("%s wrote past output buffer",
+ transformer == Tcl_ExternalToUtf ?
+ "Tcl_ExternalToUtf" : "Tcl_UtfToExternal"));
result = TCL_ERROR;
} else if (result != TCL_ERROR) {
Tcl_Obj *resultObjs[3];