diff options
author | dgp <dgp@users.sourceforge.net> | 2014-07-24 15:01:16 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-07-24 15:01:16 (GMT) |
commit | f3fc4920e44aac717ca60bbc0619d7a22a791854 (patch) | |
tree | d53126be188c7fbcd9de5737ba3947b2e7dbaeb5 | |
parent | e2d932c2e380daab4ccf6f1a2fa6a0a43e66f425 (diff) | |
parent | 36ec4e104487d2d718dc0a62e145afa4bdfecafc (diff) | |
download | tcl-f3fc4920e44aac717ca60bbc0619d7a22a791854.zip tcl-f3fc4920e44aac717ca60bbc0619d7a22a791854.tar.gz tcl-f3fc4920e44aac717ca60bbc0619d7a22a791854.tar.bz2 |
merge trunk
-rw-r--r-- | tests/io.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/io.test b/tests/io.test index bf5adb0..b707c01 100644 --- a/tests/io.test +++ b/tests/io.test @@ -7612,6 +7612,36 @@ test io-53.12 {CopyData: foreground short reads, aka bug 3096275} {stdio unix op close $f1 list $::done $ch } {ok A} +test io-53.13 {TclCopyChannel: read error reporting} -setup { + proc driver {cmd args} { + variable buffer + variable index + set chan [lindex $args 0] + switch -- $cmd { + initialize { + return {initialize finalize watch read} + } + finalize { + return + } + watch {} + read { + error FAIL + } + } + } + set outFile [makeFile {} out] +} -body { + set in [chan create read [namespace which driver]] + chan configure $in -translation binary + set out [open $outFile wb] + chan copy $in $out +} -cleanup { + catch {close $in} + catch {close $out} + removeFile out + rename driver {} +} -result {error reading "*": *} -returnCodes error -match glob test io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive |