io-52.20.1 test failure
==== io-52.20.1 TclCopyChannel & read encoding error & tell position FAILED
==== Contents of test case:
# binary to encoding => the input has to be
# in utf-8 to make sense to the encoder
set in [open $path(utf8-fcopy.txt) r]
set out [open $path(kyrillic.txt) w]
# Using "-encoding ascii" means reading the "Á" gives an error
fconfigure $in -encoding ascii -profile strict
fconfigure $out -encoding koi8-r -translation lf
set l {}
# should fail, so 1 is added
lappend l [catch {fcopy $in $out}]
# should be at position 1, after the first correct byte, so 1 is read.
lappend l [tell $in]
# not sure, if flush required, but anyway
flush $out
# should be at position 1, after the first correct byte, so 1 is written.
lappend l [tell $out]
---- Result was:
1 1 0
---- Result should have been (exact matching):
1 1 1
==== io-52.20.1 FAILED
Merging the "knownBug" constraint from 8.7 has the effect of ending/masking this issue. Generally, "knownBug" tagging is disfavored compared to fixing bugs and/or tests to achieve proper behavior and proper testing.
It is not a good policy to add a testcase to trunk without a solution. This forces others to have a look at it. If you don't want to spend time to fix the bug, commit the testcase in a [bug-?????] branch, then give others the chance to fix the bug, then the full solution with the testcase - can be merged together.
This way, the GITHUB builds will be red for multiple days, suggesting there's a regression failure. This is a long-standing bug, nog a regression.
Sorry, I will remove it.
I just wanted to be sure, this is not forgotten.
Take care, Harald
It is not a good policy to add a testcase to trunk without a solution. This forces others to have a look at it.
I want to say this would be much less of an issue if tcltest supported marking tests as expected-fail (*without* using constraints). I suggested this in [53cdb9696c] but it seems others either do not understand the idea or find it useful.
Test removed from core-8-branch and main.
Sorry, will not happen again.
Take care, Harald