summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2014-02-26 11:26:00 (GMT)
committerdgp <dgp@noemail.net>2014-02-26 11:26:00 (GMT)
commitf00f4a2cc71693dbb428dfcc9c75139b961a485b (patch)
tree39f33d382a1fb544842a56dc668a70accfed9e28 /tests
parent7595a0cd7cb9416636e8e48170b5e51355a47262 (diff)
downloadtcl-f00f4a2cc71693dbb428dfcc9c75139b961a485b.zip
tcl-f00f4a2cc71693dbb428dfcc9c75139b961a485b.tar.gz
tcl-f00f4a2cc71693dbb428dfcc9c75139b961a485b.tar.bz2
More coverage tests and bug fixes.
FossilOrigin-Name: 929bdbd0af1ef6ce7db94deab3f5defbbb7d1410
Diffstat (limited to 'tests')
-rw-r--r--tests/io.test56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/io.test b/tests/io.test
index 8c066ca..6f4877f 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -6786,6 +6786,62 @@ test io-52.15 {coverage of -translation crlf} {
close $out
file size $path(test2)
} 8
+test io-52.16 {coverage of eofChar handling} {
+ 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 lf -eofchar a
+ set out [open $path(test2) w]
+ fcopy $in $out
+ close $in
+ close $out
+ file size $path(test2)
+} 0
+test io-52.17 {coverage of eofChar handling} {
+ 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 lf -eofchar d
+ set out [open $path(test2) w]
+ fcopy $in $out
+ close $in
+ close $out
+ file size $path(test2)
+} 3
+test io-52.18 {coverage of eofChar handling} {
+ 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 crlf -eofchar h
+ set out [open $path(test2) w]
+ fcopy $in $out
+ close $in
+ close $out
+ file size $path(test2)
+} 8
+test io-52.19 {coverage of eofChar handling} {
+ 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 10 -translation crlf -eofchar h
+ set out [open $path(test2) w]
+ fcopy $in $out
+ close $in
+ close $out
+ file size $path(test2)
+} 8
test io-53.1 {CopyData} {fcopy} {
file delete $path(test1)