diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2023-04-03 16:37:27 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2023-04-03 16:37:27 (GMT) |
commit | 465fa239eb8f73260379ed0e6c139bab39fd2f94 (patch) | |
tree | 8efdf2be5edc4c470ba6975f7c1f525d5dde7c9e /tests | |
parent | 17d857c579bf54471a4edb05dadae166c476fe1b (diff) | |
download | tcl-465fa239eb8f73260379ed0e6c139bab39fd2f94.zip tcl-465fa239eb8f73260379ed0e6c139bab39fd2f94.tar.gz tcl-465fa239eb8f73260379ed0e6c139bab39fd2f94.tar.bz2 |
Failing test for [9ca87e6286262a62f], Sync fcopy buffers input in ReadChars().
Diffstat (limited to 'tests')
-rw-r--r-- | tests/io.test | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/io.test b/tests/io.test index 96e5ea6..22b7482 100644 --- a/tests/io.test +++ b/tests/io.test @@ -8276,7 +8276,7 @@ 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 fcopy} { +test io-53.12.0 {CopyData: foreground short reads, aka bug 3096275} {stdio unix fcopy} { file delete $path(pipe) set f1 [open $path(pipe) w] puts -nonewline $f1 { @@ -8295,6 +8295,32 @@ test io-53.12 {CopyData: foreground short reads, aka bug 3096275} {stdio unix fc close $f1 list $::done $ch } {ok A} +test io-53.12.1 { + Issue 9ca87e6286262a62. + CopyData: foreground short reads via ReadChars(). + Related to report 3096275 for ReadBytes(). + + Prior to the fix this test waited forever for read() to return. +} {stdio unix fcopy} { + file delete $path(output) + set f1 [open $path(output) w] + puts -nonewline $f1 { + chan configure stdin -encoding iso8859-1 -translation lf -buffering none + fcopy stdin stdout + } + close $f1 + set f1 [open "|[list [info nameofexecutable] $path(output)]" r+] + try { + chan configure $f1 -encoding utf-6 -buffering none + puts -nonewline $f1 A + set ch [read $f1 1] + } finally { + if {$f1 in [chan names]} { + close $f1 + } + } + lindex $ch +} A test io-53.13 {TclCopyChannel: read error reporting} -setup { proc driver {cmd args} { variable buffer |