diff options
author | ferrieux <ferrieux@users.sourceforge.net> | 2014-03-24 21:42:56 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@users.sourceforge.net> | 2014-03-24 21:42:56 (GMT) |
commit | 870ed20799fc0d228ffcf6e7add98824b0182950 (patch) | |
tree | 69f9e91010753899cfd172f816dd2b2fbf02a840 | |
parent | 01c626fca98818554b8bfbe326bee0753ae9931c (diff) | |
download | tcl-870ed20799fc0d228ffcf6e7add98824b0182950.zip tcl-870ed20799fc0d228ffcf6e7add98824b0182950.tar.gz tcl-870ed20799fc0d228ffcf6e7add98824b0182950.tar.bz2 |
Add test io-53.12 to verify proper unbuffered sync-fcopy [Bug #3096275]
-rw-r--r-- | tests/io.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/io.test b/tests/io.test index 19cd9a5..d3f249c 100644 --- a/tests/io.test +++ b/tests/io.test @@ -7450,6 +7450,25 @@ test io-53.11 {Bug 2895565} -setup { removeFile out removeFile in } -result {40 bytes copied} +test io-53.12 {CopyData: foreground short reads, aka bug 3096275} {stdio unix openpipe fcopy} { + file delete $path(pipe) + set f1 [open $path(pipe) w] + puts -nonewline $f1 { + fconfigure stdin -translation binary -blocking 0 + fconfigure stdout -buffering none -translation binary + fcopy stdin stdout + } + close $f1 + set f1 [open "|[list [interpreter] $path(pipe)]" r+] + fconfigure $f1 -translation binary -buffering none + puts -nonewline $f1 A + after 2000 {set ::done timeout} + fileevent $f1 readable {set ::done ok} + vwait ::done + set ch [read $f1 1] + close $f1 + list $::done $ch +} {ok A} test io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive |