summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclIO.c1
-rw-r--r--tests/io.test14
2 files changed, 14 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 01af6dc..4197dc0 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -8849,7 +8849,6 @@ CopyAndTranslateBuffer(
case TCL_TRANSLATE_CR: {
char *end;
- Tcl_Panic("Untested");
if (bytesInBuffer == 0) {
return 0;
}
diff --git a/tests/io.test b/tests/io.test
index e08c57a..0c2944b 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -6744,6 +6744,20 @@ test io-52.12 {coverage of -translation auto} {
close $out
file size $path(test2)
} 29
+test io-52.13 {coverage of -translation cr} {
+ file delete $path(test1) $path(test2)
+ set out [open $path(test1) wb]
+ chan configure $out -translation lf
+ puts -nonewline $out abcdefg\rhijklmn\nopqrstu\r\nvwxyz
+ close $out
+ set in [open $path(test1)]
+ chan configure $in -buffersize 8 -translation cr
+ set out [open $path(test2) w]
+ fcopy $in $out
+ close $in
+ close $out
+ file size $path(test2)
+} 30
test io-53.1 {CopyData} {fcopy} {
file delete $path(test1)