summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-05-20 15:00:50 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-05-20 15:00:50 (GMT)
commitba99f64fadc5aa254af2bd6c0ed481887704cdcf (patch)
tree907e15e4ec3484134874e0d23faeb0e26896ddc5 /tests
parent42ba1ff27ede658e6f4b9d80c5c6c2734dcb39bf (diff)
parentf6becd63de09f3ad007bb2e1543cd21230242479 (diff)
downloadtcl-ba99f64fadc5aa254af2bd6c0ed481887704cdcf.zip
tcl-ba99f64fadc5aa254af2bd6c0ed481887704cdcf.tar.gz
tcl-ba99f64fadc5aa254af2bd6c0ed481887704cdcf.tar.bz2
Rework the management of the CHANNEL_BLOCKED and CHANNEL_EOF flags, in
particular not allowing them to leak between multiple layers of a stacked channel. Much common code refactored into ChanRead().
Diffstat (limited to 'tests')
-rw-r--r--tests/io.test16
-rw-r--r--tests/iogt.test3
2 files changed, 17 insertions, 2 deletions
diff --git a/tests/io.test b/tests/io.test
index 5f31d8e..a2e2397 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -6705,11 +6705,23 @@ test io-52.4 {TclCopyChannel} {fcopy} {
fconfigure $f1 -translation lf -blocking 0
fconfigure $f2 -translation cr -blocking 0
fcopy $f1 $f2 -size 40
- set result [list [fconfigure $f1 -blocking] [fconfigure $f2 -blocking]]
+ set result [list [fblocked $f1] [fconfigure $f1 -blocking] [fconfigure $f2 -blocking]]
+ close $f1
+ close $f2
+ lappend result [file size $path(test1)]
+} {0 0 0 40}
+test io-52.4.1 {TclCopyChannel} {fcopy} {
+ file delete $path(test1)
+ set f1 [open $thisScript]
+ set f2 [open $path(test1) w]
+ fconfigure $f1 -translation lf -blocking 0 -buffersize 10000000
+ fconfigure $f2 -translation cr -blocking 0
+ fcopy $f1 $f2 -size 40
+ set result [list [fblocked $f1] [fconfigure $f1 -blocking] [fconfigure $f2 -blocking]]
close $f1
close $f2
lappend result [file size $path(test1)]
-} {0 0 40}
+} {0 0 0 40}
test io-52.5 {TclCopyChannel, all} {fcopy} {
file delete $path(test1)
set f1 [open $thisScript]
diff --git a/tests/iogt.test b/tests/iogt.test
index 0e2eb3c..5fe3dc2 100644
--- a/tests/iogt.test
+++ b/tests/iogt.test
@@ -552,6 +552,7 @@ query/maxRead
read
query/maxRead
flush/read
+query/maxRead
delete/read
--------
create/write
@@ -604,6 +605,7 @@ read {
}
query/maxRead {} -1
flush/read {} {}
+query/maxRead {} -1
delete/read {} *ignored*
--------
create/write {} *ignored*
@@ -658,6 +660,7 @@ read {%^&*()_+-=
}
query/maxRead {} -1
flush/read {} {}
+query/maxRead {} -1
write %^&*()_+-= %^&*()_+-=
write {
} {