summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-02-26 11:26:00 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-02-26 11:26:00 (GMT)
commite3adf1d9a076bcb2704e4364c50097b49e6348c5 (patch)
tree39f33d382a1fb544842a56dc668a70accfed9e28 /tests
parentc7f19f76c5362c2918fe01d49808b3246fd84100 (diff)
downloadtcl-e3adf1d9a076bcb2704e4364c50097b49e6348c5.zip
tcl-e3adf1d9a076bcb2704e4364c50097b49e6348c5.tar.gz
tcl-e3adf1d9a076bcb2704e4364c50097b49e6348c5.tar.bz2
More coverage tests and bug fixes.
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)