summaryrefslogtreecommitdiffstats
path: root/tests/iogt.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-11-06 16:12:26 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-11-06 16:12:26 (GMT)
commit4cb80cd4e64044f5891b073788734efd753e5100 (patch)
treef8b76525d88e681667025f5f174e1baf8f3cd720 /tests/iogt.test
parent4ec8e3c11c2a7fdc1fd9efce21a8e6d92ce8a0e5 (diff)
downloadtcl-4cb80cd4e64044f5891b073788734efd753e5100.zip
tcl-4cb80cd4e64044f5891b073788734efd753e5100.tar.gz
tcl-4cb80cd4e64044f5891b073788734efd753e5100.tar.bz2
Also test transfroms that delay.bug_5adc350683
Diffstat (limited to 'tests/iogt.test')
-rw-r--r--tests/iogt.test30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/iogt.test b/tests/iogt.test
index 1a18afc..89e62d4 100644
--- a/tests/iogt.test
+++ b/tests/iogt.test
@@ -1039,6 +1039,36 @@ test iogt-7.0 {Handle fleeting EOF} -constraints {testchannel} -body {
close $chan
} -result {0 ..... 1 {} 0 ..... 1}
+proc delay {op data} {
+ variable store
+ switch -- $op {
+ create/write - create/read -
+ delete/write - delete/read -
+ flush/write - write -
+ clear_read {;#ignore}
+ flush/read -
+ read {
+ if {![info exists store]} {set store {}}
+ set reply $store
+ set store $data
+ return $reply
+ }
+ query/maxRead {return -1}
+ }
+}
+
+test iogt-7.1 {Handle fleeting EOF} -constraints {testchannel} -body {
+ set chan [chan create read [namespace which driver]]
+ testchannel transform $chan -command [namespace code delay]
+ list [eof $chan] [read $chan] [eof $chan] [read $chan 0] [eof $chan] \
+ [read $chan] [eof $chan]
+} -cleanup {
+ close $chan
+} -result {0 ..... 1 {} 0 ..... 1}
+
+rename delay {}
+rename driver {}
+
# cleanup
foreach file [list dummy dummyout __echo_srv__.tcl] {
removeFile $file