summaryrefslogtreecommitdiffstats
path: root/tests/io.test
diff options
context:
space:
mode:
authorferrieux <ferrieux@users.sourceforge.net>2012-04-28 17:03:10 (GMT)
committerferrieux <ferrieux@users.sourceforge.net>2012-04-28 17:03:10 (GMT)
commit39e076480d96baa096f628753c88b68eb9d7f601 (patch)
tree7124e2dc1c1842ef42b4b750e7f7fe117c7e07ae /tests/io.test
parented76f23a67ff725a3ef859435e72a1d809d53f8e (diff)
downloadtcl-39e076480d96baa096f628753c88b68eb9d7f601.zip
tcl-39e076480d96baa096f628753c88b68eb9d7f601.tar.gz
tcl-39e076480d96baa096f628753c88b68eb9d7f601.tar.bz2
Compat flag, test, and doc update.tip_398_impl
Diffstat (limited to 'tests/io.test')
-rw-r--r--tests/io.test21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/io.test b/tests/io.test
index 53b85fa..74a246c 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -2736,6 +2736,25 @@ test io-29.33 {Tcl_Flush, implicit flush on exit} {exec} {
close $f
set r
} "hello\nbye\nstrange\n"
+set path(script2) [makeFile {} script2]
+test io-29.33b {TIP#398, no implicit flush of nonblocking on exit} {exec} {
+ set f [open $path(script) w]
+ puts $f {
+ fconfigure stdout -blocking 0
+ puts -nonewline stdout [string repeat A 655360]
+ flush stdout
+ }
+ close $f
+ set f [open $path(script2) w]
+ puts $f {after 2000}
+ close $f
+ set t1 [clock seconds]
+ set ff [open "|[list [interpreter] $path(script2)]" w]
+ exec [interpreter] $path(script) >@ $ff
+ set t2 [clock seconds]
+ close $ff
+ expr {($t2-$t1)/2}
+} 0
test io-29.34 {Tcl_Close, async flush on close, using sockets} {socket tempNotMac fileevent} {
variable c 0
variable x running
@@ -7761,7 +7780,7 @@ test io-73.2 {channel Tcl_Obj SetChannelFromAny, bug 2407783} -setup {
# ### ### ### ######### ######### #########
# cleanup
-foreach file [list fooBar longfile script output test1 pipe my_script \
+foreach file [list fooBar longfile script script2 output test1 pipe my_script \
test2 test3 cat stdout kyrillic.txt utf8-fcopy.txt utf8-rp.txt] {
removeFile $file
}