summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ioCmd.test3
-rw-r--r--tests/ioTrans.test28
-rw-r--r--tests/iogt.test2
3 files changed, 27 insertions, 6 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 3976d25..ebc9cc7 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -2824,10 +2824,11 @@ test iocmd.tf-24.17.bug3522560 {postevent for transfered channel} \
set res
} -cleanup {
+ after cancel $::timer
rename LOG {}
rename POST {}
rename HANDLER {}
- unset beat drive data forever res tid ch
+ unset beat drive data forever res tid ch timer
} -match glob \
-result {{initialize rc* read} {watch rc* read} {read rc* 4096} {watch rc* {}} {watch rc* read} {read rc* 4096} {watch rc* {}} {finalize rc*}}
diff --git a/tests/ioTrans.test b/tests/ioTrans.test
index b21d894..7f4f7f0 100644
--- a/tests/ioTrans.test
+++ b/tests/ioTrans.test
@@ -539,7 +539,7 @@ test iortrans-4.8 {chan read, read, bug 2921116} -setup {
tempdone
rename foo {}
} -result {{read rt* {test data
-}} file*}
+}} {}}
test iortrans-4.8.1 {chan read, bug 721ec69271} -setup {
set res {}
} -match glob -body {
@@ -557,8 +557,28 @@ test iortrans-4.8.1 {chan read, bug 721ec69271} -setup {
} -cleanup {
tempdone
rename foo {}
-} -result {{read rt* {test data
-}} file*}
+} -result {{read rt* te} {read rt* st} {read rt* { d}} {read rt* at} {read rt* {a
+}} {}}
+test iortrans-4.8.2 {chan read, bug 721ec69271} -setup {
+ set res {}
+} -match glob -body {
+ proc foo {fd args} {
+ handle.initialize
+ handle.finalize
+ lappend ::res $args
+ # Kill and recreate transform while it is operating
+ chan pop $fd
+ chan push $fd [list foo $fd]
+ return x
+ }
+ set c [chan push [set c [tempchan]] [list foo $c]]
+ chan configure $c -buffersize 1
+ lappend res [read $c]
+} -cleanup {
+ tempdone
+ rename foo {}
+} -result {{read rt* t} {read rt* e} {read rt* s} {read rt* t} {read rt* { }} {read rt* d} {read rt* a} {read rt* t} {read rt* a} {read rt* {
+}} {}}
test iortrans-4.9 {chan read, gets, bug 2921116} -setup {
set res {}
} -match glob -body {
@@ -576,7 +596,7 @@ test iortrans-4.9 {chan read, gets, bug 2921116} -setup {
tempdone
rename foo {}
} -result {{read rt* {test data
-}} file*}
+}} {}}
# --- === *** ###########################
# method write (via puts)
diff --git a/tests/iogt.test b/tests/iogt.test
index bd3c67b..ded8bb9 100644
--- a/tests/iogt.test
+++ b/tests/iogt.test
@@ -228,7 +228,7 @@ proc id_torture {chan op data} {
delete/read -
clear_read {;#ignore}
flush/write -
- flush/read -
+ flush/read {}
write -
read {
testchannel unstack $chan