tcltest uses nonexistent identity encoding
Closed / Fixed767b0f8e4324bdb825ad8c6362237aa15fd09260Created 13 years agoUpdated 11 years ago
Descriptionplain2014-05-14 02:52:23
The [bytestring] command in the tcltest package uses the identity encoding which has been removed from Tcl. Apparently no one uses [bytestring], or else this would have been reported and fixed by now. Perhaps the solution is to remove [bytestring]!
jan.nijtmanswiki2014-05-14 09:33:24
As far as I know, the "identity" is note removed from the core (yet). See: http://core.tcl.tk/tcl/artifact/49fa5cd974?ln=565-571.
However, it would be good to replace "bytecode <arg>" in the testcases with "encoding convertfrom utf-8 <arg>" everywhere, and deprecate the "bytecode" function in tcltest package (we cannot remove it there, just let it give an error when running in Tcl 9 would be OK).
dgpplain2014-05-20 18:17:27
Eliminating the use of [tcltest::bytestring] in our test suites is indeed the first step, but [encoding convertfrom utf-8] is not a proper replacement.
dgpplain2014-05-20 18:25:34
What a few tests in the test suite need is a buggy, broken command that generates invalid Tcl values (not respecting the correct internal encoding that Tcl uses) so that some of Tcl's internal's ability to cope with invalid arguments to public routines can be tried. It was always a mistake to have that command be part of the tcltest package providing general test suite support commands. To the extent such a command exists, it should be provided by the Tcltest package of custom internals tickling commands aimed a narrow purposes of internals testing.
jan.nijtmanswiki2015-10-07 13:58:39
Fixed in [79ace7b793cebdf2], by introducing "testbytestring". The use of the "identity" encoding is not fully eliminated yet, but at least the test-cases don't use it any more now.
Log in (anonymous is fine) to add a comment.