summaryrefslogtreecommitdiffstats
path: root/tests/io.test
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)
commit2207a65968067f338adedf3dd97e3970908e803f (patch)
tree39f33d382a1fb544842a56dc668a70accfed9e28 /tests/io.test
parente8e909f1cdd4848bf73c85117a5d0062dc386839 (diff)
downloadtcl-2207a65968067f338adedf3dd97e3970908e803f.zip
tcl-2207a65968067f338adedf3dd97e3970908e803f.tar.gz
tcl-2207a65968067f338adedf3dd97e3970908e803f.tar.bz2
More coverage tests and bug fixes.
Diffstat (limited to 'tests/io.test')
-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)