summaryrefslogtreecommitdiffstats
path: root/tests/chanio.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-12-19 03:31:00 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-12-19 03:31:00 (GMT)
commit5ed945e98e1caf70d6ea848c61dcbc45a4d12431 (patch)
tree8d15729d0f7217c739f7d371d25b7d05a6206d1d /tests/chanio.test
parent056b49e15ce3aeeb276308a5bb1380859964f423 (diff)
downloadtcl-5ed945e98e1caf70d6ea848c61dcbc45a4d12431.zip
tcl-5ed945e98e1caf70d6ea848c61dcbc45a4d12431.tar.gz
tcl-5ed945e98e1caf70d6ea848c61dcbc45a4d12431.tar.bz2
* tests/chanio.test: Replaced [chan event] handlers that
returned TCL_RETURN return code, with more conventional ones that return TCL_OK to suppress otherwise strange writes of outdated $::errorInfo values to stderr. [Bug 2444274].
Diffstat (limited to 'tests/chanio.test')
-rw-r--r--tests/chanio.test16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/chanio.test b/tests/chanio.test
index 0535bbd..1c77e53 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -13,7 +13,7 @@
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: chanio.test,v 1.19 2008/12/18 23:48:39 andreas_kupries Exp $
+# RCS: @(#) $Id: chanio.test,v 1.20 2008/12/19 03:31:00 dgp Exp $
if {[catch {package require tcltest 2}]} {
chan puts stderr "Skipping tests in [info script]. tcltest 2 required."
@@ -2141,8 +2141,11 @@ test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} {
set timer [after 1000 {set ::done Failed}]
set ::acc {}
fileevent $::ff readable {
- if {[gets $::ff line]<0} {set ::done Succeeded;return}
- lappend ::acc $line
+ if {[gets $::ff line]<0} {
+ set ::done Succeeded
+ } else {
+ lappend ::acc $line
+ }
}
vwait ::done
after cancel $timer
@@ -2169,8 +2172,11 @@ test chan-io-28.7 {Tcl_CloseEx (half-close) socket} {
set timer [after 1000 {set ::done Failed}]
set ::acc {}
fileevent $::s readable {
- if {[gets $::s line]<0} {set ::done Succeeded;return}
- lappend ::acc $line
+ if {[gets $::s line]<0} {
+ set ::done Succeeded
+ } else {
+ lappend ::acc $line
+ }
}
vwait ::done
after cancel $timer