summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--tests/io.test730
2 files changed, 368 insertions, 369 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ab547b..27e95d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,9 +2,10 @@
* tests/exec.test: Corrected temporary file management
* tests/fileSystem.test: issues uncovered by -debug 1 test
- * tests/ioCmd.test: operations. Also backported some
- * tests/pid.test: other fixes from the HEAD.
- * tests/socket.test: [Bugs 675605, 675655]
+ * tests/io.test: operations. Also backported some
+ * tests/ioCmd.test: other fixes from the HEAD.
+ * tests/pid.test: [Bugs 675605, 675655, 675659]
+ * tests/socket.test:
* tests/source.test:
* tests/fCmd.test: Run tests with the [temporaryDirectory] as
diff --git a/tests/io.test b/tests/io.test
index 7d39138..e9531e1 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: io.test,v 1.40.2.1 2003/10/07 14:55:49 dgp Exp $
+# RCS: @(#) $Id: io.test,v 1.40.2.2 2003/10/07 21:37:48 dgp Exp $
if {[catch {package require tcltest 2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2 required."
@@ -30,14 +30,14 @@ namespace eval ::tcl::test::io {
testConstraint testchannel [llength [info commands testchannel]]
testConstraint exec [llength [info commands exec]]
+testConstraint openpipe 1
+testConstraint fileevent [llength [info commands fileevent]]
+testConstraint fcopy [llength [info commands fcopy]]
# You need a *very* special environment to do some tests. In
# particular, many file systems do not support large-files...
testConstraint largefileSupport 0
-removeFile test1
-removeFile pipe
-
# set up a long data file for some of the following tests
set path(longfile) [makeFile {} longfile]
@@ -407,7 +407,7 @@ test io-6.6 {Tcl_GetsObj: loop test} {
close $f
set x
} [list 256 $a]
-test io-6.7 {Tcl_GetsObj: error in input} {stdio} {
+test io-6.7 {Tcl_GetsObj: error in input} {stdio openpipe} {
# if (FilterInputBytes(chanPtr, &gs) != 0)
set f [open "|[list [interpreter] cat]" w+]
@@ -669,7 +669,7 @@ test io-6.30 {Tcl_GetsObj: crlf mode: buffer exhausted} {testchannel} {
close $f
set x
} [list 15 "123456789012345" 15]
-test io-6.31 {Tcl_GetsObj: crlf mode: buffer exhausted, blocked} {stdio testchannel} {
+test io-6.31 {Tcl_GetsObj: crlf mode: buffer exhausted, blocked} {stdio testchannel openpipe fileevent} {
# (FilterInputBytes() != 0)
set f [open "|[list [interpreter] $path(cat)]" w+]
@@ -808,7 +808,7 @@ test io-6.42 {Tcl_GetsObj: auto mode: several chars} {
close $f
set x
} [list 4 "abcd" 4 "efgh" 4 "ijkl" 4 "mnop" -1 ""]
-test io-6.43 {Tcl_GetsObj: input saw cr} {stdio testchannel} {
+test io-6.43 {Tcl_GetsObj: input saw cr} {stdio testchannel openpipe fileevent} {
# if (chanPtr->flags & INPUT_SAW_CR)
set f [open "|[list [interpreter] $path(cat)]" w+]
@@ -825,7 +825,7 @@ test io-6.43 {Tcl_GetsObj: input saw cr} {stdio testchannel} {
close $f
set x
} [list "bbbbbbbbbbbbbbb" 15 "123456789abcdef" 1 4 "abcd" 0 3 "efg"]
-test io-6.44 {Tcl_GetsObj: input saw cr, not followed by cr} {stdio testchannel} {
+test io-6.44 {Tcl_GetsObj: input saw cr, not followed by cr} {stdio testchannel openpipe fileevent} {
# not (*eol == '\n')
set f [open "|[list [interpreter] $path(cat)]" w+]
@@ -842,7 +842,7 @@ test io-6.44 {Tcl_GetsObj: input saw cr, not followed by cr} {stdio testchannel}
close $f
set x
} [list "bbbbbbbbbbbbbbb" 15 "123456789abcdef" 1 4 "abcd" 0 3 "efg"]
-test io-6.45 {Tcl_GetsObj: input saw cr, skip right number of bytes} {stdio testchannel} {
+test io-6.45 {Tcl_GetsObj: input saw cr, skip right number of bytes} {stdio testchannel openpipe fileevent} {
# Tcl_ExternalToUtf()
set f [open "|[list [interpreter] $path(cat)]" w+]
@@ -859,7 +859,7 @@ test io-6.45 {Tcl_GetsObj: input saw cr, skip right number of bytes} {stdio test
close $f
set x
} [list 15 "123456789abcdef" 1 4 "abcd" 0]
-test io-6.46 {Tcl_GetsObj: input saw cr, followed by just \n should give eof} {stdio testchannel} {
+test io-6.46 {Tcl_GetsObj: input saw cr, followed by just \n should give eof} {stdio testchannel openpipe fileevent} {
# memmove()
set f [open "|[list [interpreter] $path(cat)]" w+]
@@ -984,7 +984,7 @@ test io-6.55 {Tcl_GetsObj: overconverted} {
close $f
set x
} [list 8 "there\u4e00ok" 11 "\u4e01more bytes" 4 "here"]
-test io-6.56 {Tcl_GetsObj: incomplete lines should disable file events} {stdio} {
+test io-6.56 {Tcl_GetsObj: incomplete lines should disable file events} {stdio openpipe fileevent} {
update
set f [open "|[list [interpreter] $path(cat)]" w+]
fconfigure $f -buffering none
@@ -1044,7 +1044,7 @@ test io-7.3 {FilterInputBytes: split up character at EOF} {testchannel} {
close $f
set x
} [list 15 "1234567890123\uff10\uff11" 18 0 1 -1 ""]
-test io-7.4 {FilterInputBytes: recover from split up character} {stdio} {
+test io-7.4 {FilterInputBytes: recover from split up character} {stdio openpipe fileevent} {
set f [open "|[list [interpreter] $path(cat)]" w+]
fconfigure $f -encoding binary -buffering none
puts -nonewline $f "1234567890123\x82\x4f\x82\x50\x82"
@@ -1079,7 +1079,7 @@ test io-8.1 {PeekAhead: only go to device if no more cached data} {testchannel}
close $f
set x
} "7"
-test io-8.2 {PeekAhead: only go to device if no more cached data} {stdio testchannel} {
+test io-8.2 {PeekAhead: only go to device if no more cached data} {stdio testchannel openpipe fileevent} {
# not (bufPtr->nextPtr == NULL)
set f [open "|[list [interpreter] $path(cat)]" w+]
@@ -1099,7 +1099,7 @@ test io-8.2 {PeekAhead: only go to device if no more cached data} {stdio testcha
close $f
set x
} [list -1 "" 42 15 "123456789012345" 25]
-test io-8.3 {PeekAhead: no cached data available} {stdio testchannel} {
+test io-8.3 {PeekAhead: no cached data available} {stdio testchannel openpipe fileevent} {
# (bytesLeft == 0)
set f [open "|[list [interpreter] $path(cat)]" w+]
@@ -1132,7 +1132,7 @@ test io-8.4 {PeekAhead: cached data available in this buffer} {
set x
} $a
unset a
-test io-8.5 {PeekAhead: don't peek if last read was short} {stdio testchannel} {
+test io-8.5 {PeekAhead: don't peek if last read was short} {stdio testchannel openpipe fileevent} {
# (bufPtr->nextAdded < bufPtr->length)
set f [open "|[list [interpreter] $path(cat)]" w+]
@@ -1144,7 +1144,7 @@ test io-8.5 {PeekAhead: don't peek if last read was short} {stdio testchannel} {
close $f
set x
} {15 abcdefghijklmno 1}
-test io-8.6 {PeekAhead: change to non-blocking mode} {stdio testchannel} {
+test io-8.6 {PeekAhead: change to non-blocking mode} {stdio testchannel openpipe fileevent} {
# ((chanPtr->flags & CHANNEL_NONBLOCKING) == 0)
set f [open "|[list [interpreter] $path(cat)]" w+]
@@ -1156,7 +1156,7 @@ test io-8.6 {PeekAhead: change to non-blocking mode} {stdio testchannel} {
close $f
set x
} {15 abcdefghijklmno 1}
-test io-8.7 {PeekAhead: cleanup} {stdio testchannel} {
+test io-8.7 {PeekAhead: cleanup} {stdio testchannel openpipe fileevent} {
# Make sure bytes are removed from buffer.
set f [open "|[list [interpreter] $path(cat)]" w+]
@@ -1322,7 +1322,7 @@ test io-12.3 {ReadChars: allocate more space} {
close $f
set x
} {abcdefghijklmnopqrstuvwxyz}
-test io-12.4 {ReadChars: split-up char} {stdio testchannel} {
+test io-12.4 {ReadChars: split-up char} {stdio testchannel openpipe fileevent} {
# (srcRead == 0)
set f [open "|[list [interpreter] $path(cat)]" w+]
@@ -1347,7 +1347,7 @@ test io-12.4 {ReadChars: split-up char} {stdio testchannel} {
close $f
set x
} [list "123456789012345" 1 "\u672c" 0]
-test io-12.5 {ReadChars: fileevents on partial characters} {stdio} {
+test io-12.5 {ReadChars: fileevents on partial characters} {stdio openpipe fileevent} {
set path(test1) [makeFile {
fconfigure stdout -encoding binary -buffering none
gets stdin; puts -nonewline "\xe7"
@@ -1442,7 +1442,7 @@ test io-13.5 {TranslateInputEOL: crlf mode: naked lf} {
close $f
set x
} "abcd\ndef\nfgh"
-test io-13.6 {TranslateInputEOL: auto mode: saw cr in last segment} {stdio testchannel} {
+test io-13.6 {TranslateInputEOL: auto mode: saw cr in last segment} {stdio testchannel openpipe fileevent} {
# (chanPtr->flags & INPUT_SAW_CR)
# This test may fail on slower machines.
@@ -1468,7 +1468,7 @@ test io-13.6 {TranslateInputEOL: auto mode: saw cr in last segment} {stdio testc
close $f
set x
} [list "abcdefghj\n" 1 "01234" 0]
-test io-13.7 {TranslateInputEOL: auto mode: naked \r} {testchannel} {
+test io-13.7 {TranslateInputEOL: auto mode: naked \r} {testchannel openpipe} {
# (src >= srcMax)
set f [open $path(test1) w]
@@ -1580,7 +1580,7 @@ test io-14.2 {Tcl_SetStdChannel and Tcl_GetStdChannel} {
set path(test3) [makeFile {} test3]
-test io-14.3 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec} {
+test io-14.3 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec openpipe} {
set f [open $path(test1) w]
puts $f [format {
close stdin
@@ -1670,9 +1670,9 @@ test io-14.7 {Tcl_GetChannel: stdio name translation} {
set path(script) [makeFile {} script]
-test io-14.8 {reuse of stdio special channels} {stdio} {
- removeFile script
- removeFile test1
+test io-14.8 {reuse of stdio special channels} {stdio openpipe} {
+ file delete $path(script)
+ file delete $path(test1)
set f [open $path(script) w]
puts $f [format {
close stderr
@@ -1689,9 +1689,9 @@ test io-14.8 {reuse of stdio special channels} {stdio} {
set c
} hello
-test io-14.9 {reuse of stdio special channels} {stdio} {
- removeFile script
- removeFile test1
+test io-14.9 {reuse of stdio special channels} {stdio openpipe fileevent} {
+ file delete $path(script)
+ file delete $path(test1)
set f [open $path(script) w]
puts $f {
array set path [lindex $argv 0]
@@ -1760,7 +1760,7 @@ test io-17.3 {GetChannelTable, DeleteChannelTable on std handles} {testchannel}
} {0 1 0}
test io-18.1 {Tcl_RegisterChannel, Tcl_UnregisterChannel} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set l ""
set f [open $path(test1) w]
lappend l [lindex [testchannel info $f] 15]
@@ -1774,7 +1774,7 @@ test io-18.1 {Tcl_RegisterChannel, Tcl_UnregisterChannel} {testchannel} {
[list 1 [format "can not find channel named \"%s\"" $f]]
} 0
test io-18.2 {Tcl_RegisterChannel, Tcl_UnregisterChannel} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set l ""
set f [open $path(test1) w]
lappend l [lindex [testchannel info $f] 15]
@@ -1795,7 +1795,7 @@ test io-18.2 {Tcl_RegisterChannel, Tcl_UnregisterChannel} {testchannel} {
[list 1 2 1 1 [format "can not find channel named \"%s\"" $f]]
} 0
test io-18.3 {Tcl_RegisterChannel, Tcl_UnregisterChannel} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set l ""
set f [open $path(test1) w]
lappend l [lindex [testchannel info $f] 15]
@@ -1818,7 +1818,7 @@ test io-19.1 {Tcl_GetChannel->Tcl_GetStdChannel, standard handles} {
eof stdin
} 0
test io-19.2 {testing Tcl_GetChannel, user opened handle} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
set x [eof $f]
close $f
@@ -1828,7 +1828,7 @@ test io-19.3 {Tcl_GetChannel, channel not found} {
list [catch {eof file34} msg] $msg
} {1 {can not find channel named "file34"}}
test io-19.4 {Tcl_CreateChannel, insertion into channel table} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
set l ""
lappend l [eof $f]
@@ -1874,7 +1874,7 @@ test io-20.4 {Tcl_CreateChannel: initial settings} {macOnly} {
set path(stdout) [makeFile {} stdout]
-test io-20.5 {Tcl_CreateChannel: install channel in empty slot} {stdio} {
+test io-20.5 {Tcl_CreateChannel: install channel in empty slot} {stdio openpipe} {
set f [open $path(script) w]
puts $f [format {
close stdout
@@ -1902,7 +1902,7 @@ test io-22.1 {Tcl_GetChannelMode} {
} {}
test io-23.1 {Tcl_GetChannelName} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
set n [testchannel name $f]
close $f
@@ -1910,7 +1910,7 @@ test io-23.1 {Tcl_GetChannelName} {testchannel} {
} 0
test io-24.1 {Tcl_GetChannelType} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
set t [testchannel type $f]
close $f
@@ -1931,7 +1931,7 @@ test io-25.1 {Tcl_GetChannelHandle, input} {testchannel} {
set l
} {10 11}
test io-25.2 {Tcl_GetChannelHandle, output} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts $f hello
@@ -1942,11 +1942,11 @@ test io-25.2 {Tcl_GetChannelHandle, output} {testchannel} {
lappend l [testchannel outputbuffered $f]
lappend l [tell $f]
close $f
- removeFile test1
+ file delete $path(test1)
set l
} {6 6 0 6}
-test io-26.1 {Tcl_GetChannelInstanceData} {stdio} {
+test io-26.1 {Tcl_GetChannelInstanceData} {stdio openpipe} {
# "pid" command uses Tcl_GetChannelInstanceData
# Don't care what pid is (but must be a number), just want to exercise it.
@@ -1958,7 +1958,7 @@ test io-26.1 {Tcl_GetChannelInstanceData} {stdio} {
# Test flushing. The functions tested here are FlushChannel.
test io-27.1 {FlushChannel, no output buffered} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
flush $f
set s [file size $path(test1)]
@@ -1966,7 +1966,7 @@ test io-27.1 {FlushChannel, no output buffered} {
set s
} 0
test io-27.2 {FlushChannel, some output buffered} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -eofchar {}
set l ""
@@ -1979,7 +1979,7 @@ test io-27.2 {FlushChannel, some output buffered} {
set l
} {0 6 6}
test io-27.3 {FlushChannel, implicit flush on close} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -eofchar {}
set l ""
@@ -1990,7 +1990,7 @@ test io-27.3 {FlushChannel, implicit flush on close} {
set l
} {0 6}
test io-27.4 {FlushChannel, implicit flush when buffer fills} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -eofchar {}
fconfigure $f -buffersize 60
@@ -2007,7 +2007,7 @@ test io-27.4 {FlushChannel, implicit flush when buffer fills} {
} {0 60 72}
test io-27.5 {FlushChannel, implicit flush when buffer fills and on close} \
{unixOrPc} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -buffersize 60 -eofchar {}
set l ""
@@ -2025,9 +2025,9 @@ set path(pipe) [makeFile {} pipe]
set path(output) [makeFile {} output]
test io-27.6 {FlushChannel, async flushing, async close} \
- {stdio asyncPipeClose } {
- removeFile pipe
- removeFile output
+ {stdio asyncPipeClose openpipe} {
+ file delete $path(pipe)
+ file delete $path(output)
set f [open $path(pipe) w]
puts $f [format {
set f [open "%s" w]
@@ -2065,7 +2065,7 @@ test io-27.6 {FlushChannel, async flushing, async close} \
# Tests closing a channel. The functions tested are CloseChannel and Tcl_Close.
test io-28.1 {CloseChannel called when all references are dropped} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
interp create x
interp share "" $f x
@@ -2078,7 +2078,7 @@ test io-28.1 {CloseChannel called when all references are dropped} {testchannel}
set l
} {2 1}
test io-28.2 {CloseChannel called when all references are dropped} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
interp create x
interp share "" $f x
@@ -2093,9 +2093,9 @@ test io-28.2 {CloseChannel called when all references are dropped} {
set l
} abcdef
test io-28.3 {CloseChannel, not called before output queue is empty} \
- {stdio asyncPipeClose nonPortable} {
- removeFile pipe
- removeFile output
+ {stdio asyncPipeClose nonPortable openpipe} {
+ file delete $path(pipe)
+ file delete $path(output)
set f [open $path(pipe) w]
puts $f {
@@ -2139,7 +2139,7 @@ test io-28.3 {CloseChannel, not called before output queue is empty} \
}
} ok
test io-28.4 {Tcl_Close} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set l ""
lappend l [lsort [testchannel open]]
set f [open $path(test1) w]
@@ -2151,8 +2151,8 @@ test io-28.4 {Tcl_Close} {testchannel} {
$consoleFileNames]
string compare $l $x
} 0
-test io-28.5 {Tcl_Close vs standard handles} {stdio unixOnly testchannel} {
- removeFile script
+test io-28.5 {Tcl_Close vs standard handles} {stdio unixOnly testchannel openpipe} {
+ file delete $path(script)
set f [open $path(script) w]
puts $f {
close stdin
@@ -2169,7 +2169,7 @@ test io-29.1 {Tcl_WriteChars, channel not writable} {
list [catch {puts stdin hello} msg] $msg
} {1 {channel "stdin" wasn't opened for writing}}
test io-29.2 {Tcl_WriteChars, empty string} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -eofchar {}
puts -nonewline $f ""
@@ -2177,7 +2177,7 @@ test io-29.2 {Tcl_WriteChars, empty string} {
file size $path(test1)
} 0
test io-29.3 {Tcl_WriteChars, nonempty string} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -eofchar {}
puts -nonewline $f hello
@@ -2185,7 +2185,7 @@ test io-29.3 {Tcl_WriteChars, nonempty string} {
file size $path(test1)
} 5
test io-29.4 {Tcl_WriteChars, buffering in full buffering mode} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -buffering full -eofchar {}
puts $f hello
@@ -2199,7 +2199,7 @@ test io-29.4 {Tcl_WriteChars, buffering in full buffering mode} {testchannel} {
set l
} {6 0 0 6}
test io-29.5 {Tcl_WriteChars, buffering in line buffering mode} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -buffering line -eofchar {}
puts -nonewline $f hello
@@ -2213,7 +2213,7 @@ test io-29.5 {Tcl_WriteChars, buffering in line buffering mode} {testchannel} {
set l
} {5 0 0 11}
test io-29.6 {Tcl_WriteChars, buffering in no buffering mode} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -buffering none -eofchar {}
puts -nonewline $f hello
@@ -2228,7 +2228,7 @@ test io-29.6 {Tcl_WriteChars, buffering in no buffering mode} {testchannel} {
} {0 5 0 11}
test io-29.7 {Tcl_Flush, full buffering} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -buffering full -eofchar {}
puts -nonewline $f hello
@@ -2245,7 +2245,7 @@ test io-29.7 {Tcl_Flush, full buffering} {testchannel} {
set l
} {5 0 11 0 0 11}
test io-29.8 {Tcl_Flush, full buffering} {testchannel} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -buffering line
puts -nonewline $f hello
@@ -2268,7 +2268,7 @@ test io-29.9 {Tcl_Flush, channel not writable} {
list [catch {flush stdin} msg] $msg
} {1 {channel "stdin" wasn't opened for writing}}
test io-29.10 {Tcl_WriteChars, looping and buffering} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -eofchar {}
set f2 [open $path(longfile) r]
@@ -2280,7 +2280,7 @@ test io-29.10 {Tcl_WriteChars, looping and buffering} {
file size $path(test1)
} 387
test io-29.11 {Tcl_WriteChars, no newline, implicit flush} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -eofchar {}
set f2 [open $path(longfile) r]
@@ -2291,9 +2291,9 @@ test io-29.11 {Tcl_WriteChars, no newline, implicit flush} {
close $f2
file size $path(test1)
} 377
-test io-29.12 {Tcl_WriteChars on a pipe} {stdio} {
- removeFile test1
- removeFile pipe
+test io-29.12 {Tcl_WriteChars on a pipe} {stdio openpipe} {
+ file delete $path(test1)
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 [format {
set f1 [open "%s" r]
@@ -2316,9 +2316,9 @@ test io-29.12 {Tcl_WriteChars on a pipe} {stdio} {
close $f2
set y
} ok
-test io-29.13 {Tcl_WriteChars to a pipe, line buffered} {stdio} {
- removeFile test1
- removeFile pipe
+test io-29.13 {Tcl_WriteChars to a pipe, line buffered} {stdio openpipe} {
+ file delete $path(test1)
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 {
puts [gets stdin]
@@ -2346,7 +2346,7 @@ test io-29.13 {Tcl_WriteChars to a pipe, line buffered} {stdio} {
set y
} ok
test io-29.14 {Tcl_WriteChars, buffering and implicit flush at close} {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) w]
puts -nonewline $f "Text1"
puts -nonewline $f " Text 2"
@@ -2358,7 +2358,7 @@ test io-29.14 {Tcl_WriteChars, buffering and implicit flush at close} {
set x
} {Text1 Text 2 Text 3}
test io-29.15 {Tcl_Flush, channel not open for writing} {
- removeFile test1
+ file delete $path(test1)
set fd [open $path(test1) w]
close $fd
set fd [open $path(test1) r]
@@ -2367,7 +2367,7 @@ test io-29.15 {Tcl_Flush, channel not open for writing} {
string compare $x \
[list 1 "channel \"$fd\" wasn't opened for writing"]
} 0
-test io-29.16 {Tcl_Flush on pipe opened only for reading} {stdio} {
+test io-29.16 {Tcl_Flush on pipe opened only for reading} {stdio openpipe} {
set fd [open "|[list [interpreter] cat longfile]" r]
set x [list [catch {flush $fd} msg] $msg]
catch {close $fd}
@@ -2375,7 +2375,7 @@ test io-29.16 {Tcl_Flush on pipe opened only for reading} {stdio} {
[list 1 "channel \"$fd\" wasn't opened for writing"]
} 0
test io-29.17 {Tcl_WriteChars buffers, then Tcl_Flush flushes} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf
puts $f1 hello
@@ -2387,7 +2387,7 @@ test io-29.17 {Tcl_WriteChars buffers, then Tcl_Flush flushes} {
set x
} 18
test io-29.18 {Tcl_WriteChars and Tcl_Flush intermixed} {
- removeFile test1
+ file delete $path(test1)
set x ""
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf
@@ -2406,7 +2406,7 @@ test io-29.18 {Tcl_WriteChars and Tcl_Flush intermixed} {
set x
} {18 24 30}
test io-29.19 {Explicit and implicit flushes} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -eofchar {}
set x ""
@@ -2424,7 +2424,7 @@ test io-29.19 {Explicit and implicit flushes} {
set x
} {18 24 30}
test io-29.20 {Implicit flush when buffer is full} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -eofchar {}
set line "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
@@ -2441,8 +2441,8 @@ test io-29.20 {Implicit flush when buffer is full} {
lappend z [file size $path(test1)]
set z
} {4096 12288 12600}
-test io-29.21 {Tcl_Flush to pipe} {stdio} {
- removeFile pipe
+test io-29.21 {Tcl_Flush to pipe} {stdio openpipe} {
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 {set x [read stdin 6]}
puts $f1 {set cnt [string length $x]}
@@ -2455,8 +2455,8 @@ test io-29.21 {Tcl_Flush to pipe} {stdio} {
catch {close $f1}
set x
} "read 6 characters"
-test io-29.22 {Tcl_Flush called at other end of pipe} {stdio} {
- removeFile pipe
+test io-29.22 {Tcl_Flush called at other end of pipe} {stdio openpipe} {
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 {
fconfigure stdout -buffering full
@@ -2478,8 +2478,8 @@ test io-29.22 {Tcl_Flush called at other end of pipe} {stdio} {
close $f1
set x
} {hello hello bye}
-test io-29.23 {Tcl_Flush and line buffering at end of pipe} {stdio} {
- removeFile pipe
+test io-29.23 {Tcl_Flush and line buffering at end of pipe} {stdio openpipe} {
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 {
puts hello
@@ -2513,8 +2513,8 @@ test io-29.24 {Tcl_WriteChars and Tcl_Flush move end of file} {
close $f
set x
} "{} {Line 1\nLine 2}"
-test io-29.25 {Implicit flush with Tcl_Flush to command pipelines} {stdio} {
- removeFile test3
+test io-29.25 {Implicit flush with Tcl_Flush to command pipelines} {stdio openpipe fileevent} {
+ file delete $path(test3)
set f [open "|[list [interpreter] $path(cat) | [interpreter] $path(cat) > $path(test3)]" w]
puts $f "Line 1"
puts $f "Line 2"
@@ -2525,7 +2525,7 @@ test io-29.25 {Implicit flush with Tcl_Flush to command pipelines} {stdio} {
close $f
set x
} "Line 1\nLine 2\n"
-test io-29.26 {Tcl_Flush, Tcl_Write on bidirectional pipelines} {stdio unixExecs} {
+test io-29.26 {Tcl_Flush, Tcl_Write on bidirectional pipelines} {stdio unixExecs openpipe} {
set f [open "|[list cat -u]" r+]
puts $f "Line1"
flush $f
@@ -2533,8 +2533,8 @@ test io-29.26 {Tcl_Flush, Tcl_Write on bidirectional pipelines} {stdio unixExecs
close $f
set x
} {Line1}
-test io-29.27 {Tcl_Flush on closed pipeline} {stdio} {
- removeFile pipe
+test io-29.27 {Tcl_Flush on closed pipeline} {stdio openpipe} {
+ file delete $path(pipe)
set f [open $path(pipe) w]
puts $f {exit}
close $f
@@ -2562,7 +2562,7 @@ test io-29.27 {Tcl_Flush on closed pipeline} {stdio} {
string tolower $x
} {1 {error flushing "": broken pipe} {posix epipe {broken pipe}}}
test io-29.28 {Tcl_WriteChars, lf mode} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -eofchar {}
puts $f hello\nthere\nand\nhere
@@ -2572,7 +2572,7 @@ test io-29.28 {Tcl_WriteChars, lf mode} {
set s
} 21
test io-29.29 {Tcl_WriteChars, cr mode} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr -eofchar {}
puts $f hello\nthere\nand\nhere
@@ -2580,16 +2580,16 @@ test io-29.29 {Tcl_WriteChars, cr mode} {
file size $path(test1)
} 21
test io-29.30 {Tcl_WriteChars, crlf mode} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf -eofchar {}
puts $f hello\nthere\nand\nhere
close $f
file size $path(test1)
} 25
-test io-29.31 {Tcl_WriteChars, background flush} {stdio} {
- removeFile pipe
- removeFile output
+test io-29.31 {Tcl_WriteChars, background flush} {stdio openpipe} {
+ file delete $path(pipe)
+ file delete $path(output)
set f [open $path(pipe) w]
puts $f [format {set f [open "%s" w]} $path(output)]
puts $f {fconfigure $f -translation lf}
@@ -2624,9 +2624,9 @@ test io-29.31 {Tcl_WriteChars, background flush} {stdio} {
}
} ok
test io-29.32 {Tcl_WriteChars, background flush to slow reader} \
- {stdio asyncPipeClose} {
- catch {removeFile pipe}
- catch {removeFile output}
+ {stdio asyncPipeClose openpipe} {
+ file delete $path(pipe)
+ file delete $path(output)
set f [open $path(pipe) w]
puts $f [format {set f [open {%s} w]} $path(output)]
puts $f {fconfigure $f -translation lf}
@@ -2677,7 +2677,7 @@ test io-29.33 {Tcl_Flush, implicit flush on exit} {exec} {
close $f
set r
} "hello\nbye\nstrange\n"
-test io-29.34 {Tcl_Close, async flush on close, using sockets} {socket tempNotMac} {
+test io-29.34 {Tcl_Close, async flush on close, using sockets} {socket tempNotMac fileevent} {
set c 0
variable x running
set l abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
@@ -2714,7 +2714,7 @@ test io-29.34 {Tcl_Close, async flush on close, using sockets} {socket tempNotMa
vwait [namespace which -variable x]
set c
} 2000
-test io-29.35 {Tcl_Close vs fileevent vs multiple interpreters} {socket tempNotMac} {
+test io-29.35 {Tcl_Close vs fileevent vs multiple interpreters} {socket tempNotMac fileevent} {
# On Mac, this test screws up sockets such that subsequent tests using port 2828
# either cause errors or panic().
@@ -2759,7 +2759,7 @@ test io-29.35 {Tcl_Close vs fileevent vs multiple interpreters} {socket tempNotM
# Test end of line translations. Procedures tested are Tcl_Write, Tcl_Read.
test io-30.1 {Tcl_Write lf, Tcl_Read lf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts $f hello\nthere\nand\nhere
@@ -2771,7 +2771,7 @@ test io-30.1 {Tcl_Write lf, Tcl_Read lf} {
set x
} "hello\nthere\nand\nhere\n"
test io-30.2 {Tcl_Write lf, Tcl_Read cr} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts $f hello\nthere\nand\nhere
@@ -2783,7 +2783,7 @@ test io-30.2 {Tcl_Write lf, Tcl_Read cr} {
set x
} "hello\nthere\nand\nhere\n"
test io-30.3 {Tcl_Write lf, Tcl_Read crlf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts $f hello\nthere\nand\nhere
@@ -2795,7 +2795,7 @@ test io-30.3 {Tcl_Write lf, Tcl_Read crlf} {
set x
} "hello\nthere\nand\nhere\n"
test io-30.4 {Tcl_Write cr, Tcl_Read cr} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
puts $f hello\nthere\nand\nhere
@@ -2807,7 +2807,7 @@ test io-30.4 {Tcl_Write cr, Tcl_Read cr} {
set x
} "hello\nthere\nand\nhere\n"
test io-30.5 {Tcl_Write cr, Tcl_Read lf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
puts $f hello\nthere\nand\nhere
@@ -2819,7 +2819,7 @@ test io-30.5 {Tcl_Write cr, Tcl_Read lf} {
set x
} "hello\rthere\rand\rhere\r"
test io-30.6 {Tcl_Write cr, Tcl_Read crlf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
puts $f hello\nthere\nand\nhere
@@ -2831,7 +2831,7 @@ test io-30.6 {Tcl_Write cr, Tcl_Read crlf} {
set x
} "hello\rthere\rand\rhere\r"
test io-30.7 {Tcl_Write crlf, Tcl_Read crlf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
puts $f hello\nthere\nand\nhere
@@ -2843,7 +2843,7 @@ test io-30.7 {Tcl_Write crlf, Tcl_Read crlf} {
set x
} "hello\nthere\nand\nhere\n"
test io-30.8 {Tcl_Write crlf, Tcl_Read lf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
puts $f hello\nthere\nand\nhere
@@ -2855,7 +2855,7 @@ test io-30.8 {Tcl_Write crlf, Tcl_Read lf} {
set x
} "hello\r\nthere\r\nand\r\nhere\r\n"
test io-30.9 {Tcl_Write crlf, Tcl_Read cr} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
puts $f hello\nthere\nand\nhere
@@ -2867,7 +2867,7 @@ test io-30.9 {Tcl_Write crlf, Tcl_Read cr} {
set x
} "hello\n\nthere\n\nand\n\nhere\n\n"
test io-30.10 {Tcl_Write lf, Tcl_Read auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts $f hello\nthere\nand\nhere
@@ -2883,7 +2883,7 @@ and
here
} auto}
test io-30.11 {Tcl_Write cr, Tcl_Read auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
puts $f hello\nthere\nand\nhere
@@ -2899,7 +2899,7 @@ and
here
} auto}
test io-30.12 {Tcl_Write crlf, Tcl_Read auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
puts $f hello\nthere\nand\nhere
@@ -2916,7 +2916,7 @@ here
} auto}
test io-30.13 {Tcl_Write crlf on block boundary, Tcl_Read auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
set line "123456789ABCDE" ;# 14 char plus crlf
@@ -2933,7 +2933,7 @@ test io-30.13 {Tcl_Write crlf on block boundary, Tcl_Read auto} {
} [expr 700*15+1]
test io-30.14 {Tcl_Write crlf on block boundary, Tcl_Read crlf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
set line "123456789ABCDE" ;# 14 char plus crlf
@@ -2950,7 +2950,7 @@ test io-30.14 {Tcl_Write crlf on block boundary, Tcl_Read crlf} {
} [expr 700*15+1]
test io-30.15 {Tcl_Write mixed, Tcl_Read auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts $f hello\nthere\nand\rhere
@@ -2966,7 +2966,7 @@ and
here
}
test io-30.16 {Tcl_Write ^Z at end, Tcl_Read auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts -nonewline $f hello\nthere\nand\rhere\n\x1a
@@ -2982,7 +2982,7 @@ and
here
}
test io-30.17 {Tcl_Write, implicit ^Z at end, Tcl_Read auto} {pcOnly} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -eofchar \x1a -translation lf
puts $f hello\nthere\nand\rhere
@@ -2998,7 +2998,7 @@ and
here
}
test io-30.18 {Tcl_Write, ^Z in middle, Tcl_Read auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set s [format "abc\ndef\n%cghi\nqrs" 26]
@@ -3018,7 +3018,7 @@ test io-30.18 {Tcl_Write, ^Z in middle, Tcl_Read auto} {
set l
} {abc def 0 {} 1 {} 1}
test io-30.19 {Tcl_Write, ^Z no newline in middle, Tcl_Read auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set s [format "abc\ndef\n%cghi\nqrs" 26]
@@ -3038,7 +3038,7 @@ test io-30.19 {Tcl_Write, ^Z no newline in middle, Tcl_Read auto} {
set l
} {abc def 0 {} 1 {} 1}
test io-30.20 {Tcl_Write, ^Z in middle ignored, Tcl_Read lf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -eofchar {}
set s [format "abc\ndef\n%cghi\nqrs" 26]
@@ -3060,7 +3060,7 @@ test io-30.20 {Tcl_Write, ^Z in middle ignored, Tcl_Read lf} {
set l
} "abc def 0 \x1aghi 0 qrs 0 {} 1"
test io-30.21 {Tcl_Write, ^Z in middle ignored, Tcl_Read cr} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -eofchar {}
set s [format "abc\ndef\n%cghi\nqrs" 26]
@@ -3078,7 +3078,7 @@ test io-30.21 {Tcl_Write, ^Z in middle ignored, Tcl_Read cr} {
set l
} {0 1 {} 1}
test io-30.22 {Tcl_Write, ^Z in middle ignored, Tcl_Read crlf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -eofchar {}
set s [format "abc\ndef\n%cghi\nqrs" 26]
@@ -3096,7 +3096,7 @@ test io-30.22 {Tcl_Write, ^Z in middle ignored, Tcl_Read crlf} {
set l
} {0 1 {} 1}
test io-30.23 {Tcl_Write lf, ^Z in middle, Tcl_Read auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set c [format abc\ndef\n%cqrs\ntuv 26]
@@ -3110,7 +3110,7 @@ test io-30.23 {Tcl_Write lf, ^Z in middle, Tcl_Read auto} {
list $c $e
} {8 1}
test io-30.24 {Tcl_Write lf, ^Z in middle, Tcl_Read lf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set c [format abc\ndef\n%cqrs\ntuv 26]
@@ -3124,7 +3124,7 @@ test io-30.24 {Tcl_Write lf, ^Z in middle, Tcl_Read lf} {
list $c $e
} {8 1}
test io-30.25 {Tcl_Write cr, ^Z in middle, Tcl_Read auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
set c [format abc\ndef\n%cqrs\ntuv 26]
@@ -3138,7 +3138,7 @@ test io-30.25 {Tcl_Write cr, ^Z in middle, Tcl_Read auto} {
list $c $e
} {8 1}
test io-30.26 {Tcl_Write cr, ^Z in middle, Tcl_Read cr} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
set c [format abc\ndef\n%cqrs\ntuv 26]
@@ -3152,7 +3152,7 @@ test io-30.26 {Tcl_Write cr, ^Z in middle, Tcl_Read cr} {
list $c $e
} {8 1}
test io-30.27 {Tcl_Write crlf, ^Z in middle, Tcl_Read auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
set c [format abc\ndef\n%cqrs\ntuv 26]
@@ -3166,7 +3166,7 @@ test io-30.27 {Tcl_Write crlf, ^Z in middle, Tcl_Read auto} {
list $c $e
} {8 1}
test io-30.28 {Tcl_Write crlf, ^Z in middle, Tcl_Read crlf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
set c [format abc\ndef\n%cqrs\ntuv 26]
@@ -3183,7 +3183,7 @@ test io-30.28 {Tcl_Write crlf, ^Z in middle, Tcl_Read crlf} {
# Test end of line translations. Functions tested are Tcl_Write and Tcl_Gets.
test io-31.1 {Tcl_Write lf, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts $f hello\nthere\nand\nhere
@@ -3200,7 +3200,7 @@ test io-31.1 {Tcl_Write lf, Tcl_Gets auto} {
set l
} {hello 6 auto there 12 auto}
test io-31.2 {Tcl_Write cr, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
puts $f hello\nthere\nand\nhere
@@ -3217,7 +3217,7 @@ test io-31.2 {Tcl_Write cr, Tcl_Gets auto} {
set l
} {hello 6 auto there 12 auto}
test io-31.3 {Tcl_Write crlf, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
puts $f hello\nthere\nand\nhere
@@ -3234,7 +3234,7 @@ test io-31.3 {Tcl_Write crlf, Tcl_Gets auto} {
set l
} {hello 7 auto there 14 auto}
test io-31.4 {Tcl_Write lf, Tcl_Gets lf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts $f hello\nthere\nand\nhere
@@ -3252,7 +3252,7 @@ test io-31.4 {Tcl_Write lf, Tcl_Gets lf} {
set l
} {hello 6 lf there 12 lf}
test io-31.5 {Tcl_Write lf, Tcl_Gets cr} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts $f hello\nthere\nand\nhere
@@ -3272,7 +3272,7 @@ test io-31.5 {Tcl_Write lf, Tcl_Gets cr} {
set l
} {21 21 cr 1 {} 21 cr 1}
test io-31.6 {Tcl_Write lf, Tcl_Gets crlf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts $f hello\nthere\nand\nhere
@@ -3292,7 +3292,7 @@ test io-31.6 {Tcl_Write lf, Tcl_Gets crlf} {
set l
} {21 21 crlf 1 {} 21 crlf 1}
test io-31.7 {Tcl_Write cr, Tcl_Gets cr} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
puts $f hello\nthere\nand\nhere
@@ -3312,7 +3312,7 @@ test io-31.7 {Tcl_Write cr, Tcl_Gets cr} {
set l
} {hello 6 cr 0 there 12 cr 0}
test io-31.8 {Tcl_Write cr, Tcl_Gets lf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
puts $f hello\nthere\nand\nhere
@@ -3332,7 +3332,7 @@ test io-31.8 {Tcl_Write cr, Tcl_Gets lf} {
set l
} {21 21 lf 1 {} 21 lf 1}
test io-31.9 {Tcl_Write cr, Tcl_Gets crlf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
puts $f hello\nthere\nand\nhere
@@ -3352,7 +3352,7 @@ test io-31.9 {Tcl_Write cr, Tcl_Gets crlf} {
set l
} {21 21 crlf 1 {} 21 crlf 1}
test io-31.10 {Tcl_Write crlf, Tcl_Gets crlf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
puts $f hello\nthere\nand\nhere
@@ -3372,7 +3372,7 @@ test io-31.10 {Tcl_Write crlf, Tcl_Gets crlf} {
set l
} {hello 7 crlf 0 there 14 crlf 0}
test io-31.11 {Tcl_Write crlf, Tcl_Gets cr} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
puts $f hello\nthere\nand\nhere
@@ -3392,7 +3392,7 @@ test io-31.11 {Tcl_Write crlf, Tcl_Gets cr} {
set l
} {hello 6 cr 0 6 13 cr 0}
test io-31.12 {Tcl_Write crlf, Tcl_Gets lf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
puts $f hello\nthere\nand\nhere
@@ -3412,7 +3412,7 @@ test io-31.12 {Tcl_Write crlf, Tcl_Gets lf} {
set l
} {6 7 lf 0 6 14 lf 0}
test io-31.13 {binary mode is synonym of lf mode} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation binary
set x [fconfigure $f -translation]
@@ -3424,7 +3424,7 @@ test io-31.13 {binary mode is synonym of lf mode} {
# not supoprted.
#
test io-31.14 {Tcl_Write mixed, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts $f hello\nthere\rand\r\nhere
@@ -3443,7 +3443,7 @@ test io-31.14 {Tcl_Write mixed, Tcl_Gets auto} {
set l
} {hello there and here 0 {} 1}
test io-31.15 {Tcl_Write mixed, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts -nonewline $f hello\nthere\rand\r\nhere\r
@@ -3462,7 +3462,7 @@ test io-31.15 {Tcl_Write mixed, Tcl_Gets auto} {
set l
} {hello there and here 0 {} 1}
test io-31.16 {Tcl_Write mixed, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts -nonewline $f hello\nthere\rand\r\nhere\n
@@ -3480,7 +3480,7 @@ test io-31.16 {Tcl_Write mixed, Tcl_Gets auto} {
set l
} {hello there and here 0 {} 1}
test io-31.17 {Tcl_Write mixed, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts -nonewline $f hello\nthere\rand\r\nhere\r\n
@@ -3499,7 +3499,7 @@ test io-31.17 {Tcl_Write mixed, Tcl_Gets auto} {
set l
} {hello there and here 0 {} 1}
test io-31.18 {Tcl_Write ^Z at end, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set s [format "hello\nthere\nand\rhere\n\%c" 26]
@@ -3519,7 +3519,7 @@ test io-31.18 {Tcl_Write ^Z at end, Tcl_Gets auto} {
set l
} {hello there and here 0 {} 1}
test io-31.19 {Tcl_Write, implicit ^Z at end, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -eofchar \x1a -translation lf
puts $f hello\nthere\nand\rhere
@@ -3538,7 +3538,7 @@ test io-31.19 {Tcl_Write, implicit ^Z at end, Tcl_Gets auto} {
set l
} {hello there and here 0 {} 1}
test io-31.20 {Tcl_Write, ^Z in middle, Tcl_Gets auto, eofChar} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set s [format "abc\ndef\n%cqrs\ntuv" 26]
@@ -3557,7 +3557,7 @@ test io-31.20 {Tcl_Write, ^Z in middle, Tcl_Gets auto, eofChar} {
set l
} {abc def 0 {} 1}
test io-31.21 {Tcl_Write, no newline ^Z in middle, Tcl_Gets auto, eofChar} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set s [format "abc\ndef\n%cqrs\ntuv" 26]
@@ -3575,7 +3575,7 @@ test io-31.21 {Tcl_Write, no newline ^Z in middle, Tcl_Gets auto, eofChar} {
set l
} {abc def 0 {} 1}
test io-31.22 {Tcl_Write, ^Z in middle ignored, Tcl_Gets lf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -eofchar {}
set s [format "abc\ndef\n%cqrs\ntuv" 26]
@@ -3597,7 +3597,7 @@ test io-31.22 {Tcl_Write, ^Z in middle ignored, Tcl_Gets lf} {
set l
} "abc def 0 \x1aqrs 0 tuv 0 {} 1"
test io-31.23 {Tcl_Write, ^Z in middle ignored, Tcl_Gets cr} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr -eofchar {}
set s [format "abc\ndef\n%cqrs\ntuv" 26]
@@ -3619,7 +3619,7 @@ test io-31.23 {Tcl_Write, ^Z in middle ignored, Tcl_Gets cr} {
set l
} "abc def 0 \x1aqrs 0 tuv 0 {} 1"
test io-31.24 {Tcl_Write, ^Z in middle ignored, Tcl_Gets crlf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf -eofchar {}
set s [format "abc\ndef\n%cqrs\ntuv" 26]
@@ -3641,7 +3641,7 @@ test io-31.24 {Tcl_Write, ^Z in middle ignored, Tcl_Gets crlf} {
set l
} "abc def 0 \x1aqrs 0 tuv 0 {} 1"
test io-31.25 {Tcl_Write lf, ^Z in middle, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set s [format "abc\ndef\n%cqrs\ntuv" 26]
@@ -3659,7 +3659,7 @@ test io-31.25 {Tcl_Write lf, ^Z in middle, Tcl_Gets auto} {
set l
} {abc def 0 {} 1}
test io-31.26 {Tcl_Write lf, ^Z in middle, Tcl_Gets lf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set s [format "abc\ndef\n%cqrs\ntuv" 26]
@@ -3677,7 +3677,7 @@ test io-31.26 {Tcl_Write lf, ^Z in middle, Tcl_Gets lf} {
set l
} {abc def 0 {} 1}
test io-31.27 {Tcl_Write cr, ^Z in middle, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr -eofchar {}
set s [format "abc\ndef\n%cqrs\ntuv" 26]
@@ -3695,7 +3695,7 @@ test io-31.27 {Tcl_Write cr, ^Z in middle, Tcl_Gets auto} {
set l
} {abc def 0 {} 1}
test io-31.28 {Tcl_Write cr, ^Z in middle, Tcl_Gets cr} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr -eofchar {}
set s [format "abc\ndef\n%cqrs\ntuv" 26]
@@ -3713,7 +3713,7 @@ test io-31.28 {Tcl_Write cr, ^Z in middle, Tcl_Gets cr} {
set l
} {abc def 0 {} 1}
test io-31.29 {Tcl_Write crlf, ^Z in middle, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf -eofchar {}
set s [format "abc\ndef\n%cqrs\ntuv" 26]
@@ -3731,7 +3731,7 @@ test io-31.29 {Tcl_Write crlf, ^Z in middle, Tcl_Gets auto} {
set l
} {abc def 0 {} 1}
test io-31.30 {Tcl_Write crlf, ^Z in middle, Tcl_Gets crlf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf -eofchar {}
set s [format "abc\ndef\n%cqrs\ntuv" 26]
@@ -3749,7 +3749,7 @@ test io-31.30 {Tcl_Write crlf, ^Z in middle, Tcl_Gets crlf} {
set l
} {abc def 0 {} 1}
test io-31.31 {Tcl_Write crlf on block boundary, Tcl_Gets crlf} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
set line "123456789ABCDE" ;# 14 char plus crlf
@@ -3768,7 +3768,7 @@ test io-31.31 {Tcl_Write crlf on block boundary, Tcl_Gets crlf} {
string length $c
} [expr 700*15+1]
test io-31.32 {Tcl_Write crlf on block boundary, Tcl_Gets auto} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
set line "123456789ABCDE" ;# 14 char plus crlf
@@ -3868,8 +3868,8 @@ test io-32.9 {Tcl_Read, read to end of file} {
}
set x
} ok
-test io-32.10 {Tcl_Read from a pipe} {stdio} {
- removeFile pipe
+test io-32.10 {Tcl_Read from a pipe} {stdio openpipe} {
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 {puts [gets stdin]}
close $f1
@@ -3880,8 +3880,8 @@ test io-32.10 {Tcl_Read from a pipe} {stdio} {
close $f1
set x
} "hello\n"
-test io-32.11 {Tcl_Read from a pipe} {stdio} {
- removeFile pipe
+test io-32.11 {Tcl_Read from a pipe} {stdio openpipe} {
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 {puts [gets stdin]}
puts $f1 {puts [gets stdin]}
@@ -3900,7 +3900,7 @@ test io-32.11 {Tcl_Read from a pipe} {stdio} {
} {hello
}}
test io-32.12 {Tcl_Read, -nonewline} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
puts $f1 hello
puts $f1 bye
@@ -3912,7 +3912,7 @@ test io-32.12 {Tcl_Read, -nonewline} {
} {hello
bye}
test io-32.13 {Tcl_Read, -nonewline} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
puts $f1 hello
puts $f1 bye
@@ -3924,7 +3924,7 @@ test io-32.13 {Tcl_Read, -nonewline} {
} {9 {hello
bye}}
test io-32.14 {Tcl_Read, reading in small chunks} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
puts $f "Two lines: this one"
puts $f "and this one"
@@ -3937,7 +3937,7 @@ test io-32.14 {Tcl_Read, reading in small chunks} {
and this one
}}
test io-32.15 {Tcl_Read, asking for more input than available} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
puts $f "Two lines: this one"
puts $f "and this one"
@@ -3950,7 +3950,7 @@ test io-32.15 {Tcl_Read, asking for more input than available} {
and this one
}
test io-32.16 {Tcl_Read, read to end of file with -nonewline} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
puts $f "Two lines: this one"
puts $f "and this one"
@@ -3965,7 +3965,7 @@ and this one}
# Test Tcl_Gets.
test io-33.1 {Tcl_Gets, reading what was written} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
set y "first line"
puts $f1 $y
@@ -3990,8 +3990,8 @@ test io-33.2 {Tcl_Gets into variable} {
close $f1
set z
} ok
-test io-33.3 {Tcl_Gets from pipe} {stdio} {
- removeFile pipe
+test io-33.3 {Tcl_Gets from pipe} {stdio openpipe} {
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 {puts [gets stdin]}
close $f1
@@ -4007,7 +4007,7 @@ test io-33.3 {Tcl_Gets from pipe} {stdio} {
set z
} ok
test io-33.4 {Tcl_Gets with long line} {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) w]
puts -nonewline $f "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
puts -nonewline $f "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -4027,7 +4027,7 @@ test io-33.5 {Tcl_Gets with long line} {
list $x $y
} {260 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ}
test io-33.6 {Tcl_Gets and end of file} {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) w]
puts -nonewline $f "Test1\nTest2"
close $f
@@ -4104,7 +4104,7 @@ test io-34.1 {Tcl_Seek to current position at start of file} {
set c
} 0
test io-34.2 {Tcl_Seek to offset from start} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -eofchar {}
puts $f1 "abcdefghijklmnopqrstuvwxyz"
@@ -4117,7 +4117,7 @@ test io-34.2 {Tcl_Seek to offset from start} {
set c
} 10
test io-34.3 {Tcl_Seek to end of file} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -eofchar {}
puts $f1 "abcdefghijklmnopqrstuvwxyz"
@@ -4130,7 +4130,7 @@ test io-34.3 {Tcl_Seek to end of file} {
set c
} 54
test io-34.4 {Tcl_Seek to offset from end of file} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -eofchar {}
puts $f1 "abcdefghijklmnopqrstuvwxyz"
@@ -4143,7 +4143,7 @@ test io-34.4 {Tcl_Seek to offset from end of file} {
set c
} 44
test io-34.5 {Tcl_Seek to offset from current position} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -eofchar {}
puts $f1 "abcdefghijklmnopqrstuvwxyz"
@@ -4157,7 +4157,7 @@ test io-34.5 {Tcl_Seek to offset from current position} {
set c
} 20
test io-34.6 {Tcl_Seek to offset from end of file} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -eofchar {}
puts $f1 "abcdefghijklmnopqrstuvwxyz"
@@ -4172,7 +4172,7 @@ test io-34.6 {Tcl_Seek to offset from end of file} {
} {44 {rstuvwxyz
}}
test io-34.7 {Tcl_Seek to offset from end of file, then to current position} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -eofchar {}
puts $f1 "abcdefghijklmnopqrstuvwxyz"
@@ -4187,7 +4187,7 @@ test io-34.7 {Tcl_Seek to offset from end of file, then to current position} {
close $f1
list $c1 $r1 $c2
} {44 rstuv 49}
-test io-34.8 {Tcl_Seek on pipes: not supported} {stdio} {
+test io-34.8 {Tcl_Seek on pipes: not supported} {stdio openpipe} {
set f1 [open "|[list [interpreter]]" r+]
set x [list [catch {seek $f1 0 current} msg] $msg]
close $f1
@@ -4195,7 +4195,7 @@ test io-34.8 {Tcl_Seek on pipes: not supported} {stdio} {
string tolower $x
} {1 {error during seek on "": invalid argument}}
test io-34.9 {Tcl_Seek, testing buffered input flushing} {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) w]
fconfigure $f -eofchar {}
puts -nonewline $f "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -4263,14 +4263,14 @@ test io-34.12 {Tcl_Seek testing combination of write, seek back and read} {
123
xyzzy} zzy}
test io-34.13 {Tcl_Tell at start of file} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
set p [tell $f1]
close $f1
set p
} 0
test io-34.14 {Tcl_Tell after seek to end of file} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -eofchar {}
puts $f1 "abcdefghijklmnopqrstuvwxyz"
@@ -4283,7 +4283,7 @@ test io-34.14 {Tcl_Tell after seek to end of file} {
set c1
} 54
test io-34.15 {Tcl_Tell combined with seeking} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -eofchar {}
puts $f1 "abcdefghijklmnopqrstuvwxyz"
@@ -4297,13 +4297,13 @@ test io-34.15 {Tcl_Tell combined with seeking} {
close $f1
list $c1 $c2
} {10 20}
-test io-34.16 {Tcl_tell on pipe: always -1} {stdio} {
+test io-34.16 {Tcl_tell on pipe: always -1} {stdio openpipe} {
set f1 [open "|[list [interpreter]]" r+]
set c [tell $f1]
close $f1
set c
} -1
-test io-34.17 {Tcl_Tell on pipe: always -1} {stdio} {
+test io-34.17 {Tcl_Tell on pipe: always -1} {stdio openpipe} {
set f1 [open "|[list [interpreter]]" r+]
puts $f1 {puts hello}
flush $f1
@@ -4313,7 +4313,7 @@ test io-34.17 {Tcl_Tell on pipe: always -1} {stdio} {
set c
} -1
test io-34.18 {Tcl_Tell combined with seeking and reading} {
- removeFile test2
+ file delete $path(test2)
set f [open $path(test2) w]
fconfigure $f -translation lf -eofchar {}
puts -nonewline $f "line1\nline2\nline3\nline4\nline5\n"
@@ -4359,7 +4359,7 @@ test io-34.20 {Tcl_Tell combined with writing} {
set l
} {29 39 40 447}
test io-34.21 {Tcl_Seek and Tcl_Tell on large files} {largefileSupport} {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) w]
fconfigure $f -encoding binary
set l ""
@@ -4384,7 +4384,7 @@ test io-34.21 {Tcl_Seek and Tcl_Tell on large files} {largefileSupport} {
# Test Tcl_Eof
test io-35.1 {Tcl_Eof} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
puts $f hello
puts $f hello
@@ -4402,8 +4402,8 @@ test io-35.1 {Tcl_Eof} {
close $f
set x
} {0 0 0 0 1 1}
-test io-35.2 {Tcl_Eof with pipe} {stdio} {
- removeFile pipe
+test io-35.2 {Tcl_Eof with pipe} {stdio openpipe} {
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 {gets stdin}
puts $f1 {puts hello}
@@ -4420,8 +4420,8 @@ test io-35.2 {Tcl_Eof with pipe} {stdio} {
close $f1
set x
} {0 0 0 1}
-test io-35.3 {Tcl_Eof with pipe} {stdio} {
- removeFile pipe
+test io-35.3 {Tcl_Eof with pipe} {stdio openpipe} {
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 {gets stdin}
puts $f1 {puts hello}
@@ -4443,7 +4443,7 @@ test io-35.3 {Tcl_Eof with pipe} {stdio} {
set x
} {0 0 0 1 1 1}
test io-35.4 {Tcl_Eof, eof detection on nonblocking file} {nonBlockFiles} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
close $f
set f [open $path(test1) r]
@@ -4454,8 +4454,8 @@ test io-35.4 {Tcl_Eof, eof detection on nonblocking file} {nonBlockFiles} {
close $f
set l
} {{} 1}
-test io-35.5 {Tcl_Eof, eof detection on nonblocking pipe} {stdio} {
- removeFile pipe
+test io-35.5 {Tcl_Eof, eof detection on nonblocking pipe} {stdio openpipe} {
+ file delete $path(pipe)
set f [open $path(pipe) w]
puts $f {
exit
@@ -4469,7 +4469,7 @@ test io-35.5 {Tcl_Eof, eof detection on nonblocking pipe} {stdio} {
set l
} {{} 1}
test io-35.6 {Tcl_Eof, eof char, lf write, auto read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -eofchar \x1a
puts $f abc\ndef
@@ -4483,7 +4483,7 @@ test io-35.6 {Tcl_Eof, eof char, lf write, auto read} {
list $s $l $e
} {9 8 1}
test io-35.7 {Tcl_Eof, eof char, lf write, lf read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -eofchar \x1a
puts $f abc\ndef
@@ -4497,7 +4497,7 @@ test io-35.7 {Tcl_Eof, eof char, lf write, lf read} {
list $s $l $e
} {9 8 1}
test io-35.8 {Tcl_Eof, eof char, cr write, auto read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr -eofchar \x1a
puts $f abc\ndef
@@ -4511,7 +4511,7 @@ test io-35.8 {Tcl_Eof, eof char, cr write, auto read} {
list $s $l $e
} {9 8 1}
test io-35.9 {Tcl_Eof, eof char, cr write, cr read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr -eofchar \x1a
puts $f abc\ndef
@@ -4525,7 +4525,7 @@ test io-35.9 {Tcl_Eof, eof char, cr write, cr read} {
list $s $l $e
} {9 8 1}
test io-35.10 {Tcl_Eof, eof char, crlf write, auto read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf -eofchar \x1a
puts $f abc\ndef
@@ -4539,7 +4539,7 @@ test io-35.10 {Tcl_Eof, eof char, crlf write, auto read} {
list $s $l $e
} {11 8 1}
test io-35.11 {Tcl_Eof, eof char, crlf write, crlf read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf -eofchar \x1a
puts $f abc\ndef
@@ -4553,7 +4553,7 @@ test io-35.11 {Tcl_Eof, eof char, crlf write, crlf read} {
list $s $l $e
} {11 8 1}
test io-35.12 {Tcl_Eof, eof char in middle, lf write, auto read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -eofchar {}
set i [format abc\ndef\n%cqrs\nuvw 26]
@@ -4568,7 +4568,7 @@ test io-35.12 {Tcl_Eof, eof char in middle, lf write, auto read} {
list $c $l $e
} {17 8 1}
test io-35.13 {Tcl_Eof, eof char in middle, lf write, lf read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf -eofchar {}
set i [format abc\ndef\n%cqrs\nuvw 26]
@@ -4583,7 +4583,7 @@ test io-35.13 {Tcl_Eof, eof char in middle, lf write, lf read} {
list $c $l $e
} {17 8 1}
test io-35.14 {Tcl_Eof, eof char in middle, cr write, auto read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr -eofchar {}
set i [format abc\ndef\n%cqrs\nuvw 26]
@@ -4598,7 +4598,7 @@ test io-35.14 {Tcl_Eof, eof char in middle, cr write, auto read} {
list $c $l $e
} {17 8 1}
test io-35.15 {Tcl_Eof, eof char in middle, cr write, cr read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr -eofchar {}
set i [format abc\ndef\n%cqrs\nuvw 26]
@@ -4613,7 +4613,7 @@ test io-35.15 {Tcl_Eof, eof char in middle, cr write, cr read} {
list $c $l $e
} {17 8 1}
test io-35.16 {Tcl_Eof, eof char in middle, crlf write, auto read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf -eofchar {}
set i [format abc\ndef\n%cqrs\nuvw 26]
@@ -4628,7 +4628,7 @@ test io-35.16 {Tcl_Eof, eof char in middle, crlf write, auto read} {
list $c $l $e
} {21 8 1}
test io-35.17 {Tcl_Eof, eof char in middle, crlf write, crlf read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf -eofchar {}
set i [format abc\ndef\n%cqrs\nuvw 26]
@@ -4645,7 +4645,7 @@ test io-35.17 {Tcl_Eof, eof char in middle, crlf write, crlf read} {
# Test Tcl_InputBlocked
-test io-36.1 {Tcl_InputBlocked on nonblocking pipe} {stdio} {
+test io-36.1 {Tcl_InputBlocked on nonblocking pipe} {stdio openpipe} {
set f1 [open "|[list [interpreter]]" r+]
puts $f1 {puts hello_from_pipe}
flush $f1
@@ -4664,7 +4664,7 @@ test io-36.1 {Tcl_InputBlocked on nonblocking pipe} {stdio} {
close $f1
set x
} {{} 1 hello 0 {} 1}
-test io-36.2 {Tcl_InputBlocked on blocking pipe} {stdio} {
+test io-36.2 {Tcl_InputBlocked on blocking pipe} {stdio openpipe} {
set f1 [open "|[list [interpreter]]" r+]
fconfigure $f1 -buffering line
puts $f1 {puts hello_from_pipe}
@@ -4679,7 +4679,7 @@ test io-36.2 {Tcl_InputBlocked on blocking pipe} {stdio} {
set x
} {hello_from_pipe 0 {} 0 1}
test io-36.3 {Tcl_InputBlocked vs files, short read} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
puts $f abcdefghijklmnop
close $f
@@ -4694,14 +4694,14 @@ test io-36.3 {Tcl_InputBlocked vs files, short read} {
close $f
set l
} {0 abc 0 defghijklmnop 0 1}
-test io-36.4 {Tcl_InputBlocked vs files, event driven read} {
+test io-36.4 {Tcl_InputBlocked vs files, event driven read} {fileevent} {
proc in {f} {
variable l
variable x
lappend l [read $f 3]
if {[eof $f]} {lappend l eof; close $f; set x done}
}
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
puts $f abcdefghijklmnop
close $f
@@ -4714,7 +4714,7 @@ test io-36.4 {Tcl_InputBlocked vs files, event driven read} {
} {abc def ghi jkl mno {p
} eof}
test io-36.5 {Tcl_InputBlocked vs files, short read, nonblocking} {nonBlockFiles} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
puts $f abcdefghijklmnop
close $f
@@ -4730,14 +4730,14 @@ test io-36.5 {Tcl_InputBlocked vs files, short read, nonblocking} {nonBlockFiles
close $f
set l
} {0 abc 0 defghijklmnop 0 1}
-test io-36.6 {Tcl_InputBlocked vs files, event driven read} {nonBlockFiles} {
+test io-36.6 {Tcl_InputBlocked vs files, event driven read} {nonBlockFiles fileevent} {
proc in {f} {
variable l
variable x
lappend l [read $f 3]
if {[eof $f]} {lappend l eof; close $f; set x done}
}
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
puts $f abcdefghijklmnop
close $f
@@ -4819,7 +4819,7 @@ test io-38.3 {Tcl_SetChannelBufferSize, changing buffersize between reads} {
# Test Tcl_SetChannelOption, Tcl_GetChannelOption
test io-39.1 {Tcl_GetChannelOption} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
set x [fconfigure $f1 -blocking]
close $f1
@@ -4829,14 +4829,14 @@ test io-39.1 {Tcl_GetChannelOption} {
# Test 17.2 was removed.
#
test io-39.2 {Tcl_GetChannelOption} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
set x [fconfigure $f1 -buffering]
close $f1
set x
} full
test io-39.3 {Tcl_GetChannelOption} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -buffering line
set x [fconfigure $f1 -buffering]
@@ -4844,7 +4844,7 @@ test io-39.3 {Tcl_GetChannelOption} {
set x
} line
test io-39.4 {Tcl_GetChannelOption, Tcl_SetChannelOption} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
set l ""
lappend l [fconfigure $f1 -buffering]
@@ -4860,7 +4860,7 @@ test io-39.4 {Tcl_GetChannelOption, Tcl_SetChannelOption} {
set l
} {full line none line full}
test io-39.5 {Tcl_GetChannelOption, invariance} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
set l ""
lappend l [fconfigure $f1 -buffering]
@@ -4870,7 +4870,7 @@ test io-39.5 {Tcl_GetChannelOption, invariance} {
set l
} {full {1 {bad value for -buffering: must be one of full, line, or none}} full}
test io-39.6 {Tcl_SetChannelOption, multiple options} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -buffering line
puts $f1 hello
@@ -4880,7 +4880,7 @@ test io-39.6 {Tcl_SetChannelOption, multiple options} {
set x
} 10
test io-39.7 {Tcl_SetChannelOption, buffering, translation} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf
puts $f1 hello
@@ -4894,7 +4894,7 @@ test io-39.7 {Tcl_SetChannelOption, buffering, translation} {
set x
} {0 21}
test io-39.8 {Tcl_SetChannelOption, different buffering options} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
set l ""
fconfigure $f1 -translation lf -buffering none -eofchar {}
@@ -4914,7 +4914,7 @@ test io-39.8 {Tcl_SetChannelOption, different buffering options} {
set l
} {5 10 10 10 20 20}
test io-39.9 {Tcl_SetChannelOption, blocking mode} {nonBlockFiles} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w]
close $f1
set f1 [open $path(test1) r]
@@ -4929,8 +4929,8 @@ test io-39.9 {Tcl_SetChannelOption, blocking mode} {nonBlockFiles} {
close $f1
set x
} {1 0 {} {} 0 1}
-test io-39.10 {Tcl_SetChannelOption, blocking mode} {stdio} {
- removeFile pipe
+test io-39.10 {Tcl_SetChannelOption, blocking mode} {stdio openpipe} {
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 {
gets stdin
@@ -4966,7 +4966,7 @@ test io-39.10 {Tcl_SetChannelOption, blocking mode} {stdio} {
set x
} {0 {} 1 {} 1 {} 1 1 hi 0 0 {} 1}
test io-39.11 {Tcl_SetChannelOption, Tcl_GetChannelOption, buffer size} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -buffersize -10
set x [fconfigure $f -buffersize]
@@ -4974,7 +4974,7 @@ test io-39.11 {Tcl_SetChannelOption, Tcl_GetChannelOption, buffer size} {
set x
} 4096
test io-39.12 {Tcl_SetChannelOption, Tcl_GetChannelOption buffer size} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -buffersize 10000000
set x [fconfigure $f -buffersize]
@@ -4982,7 +4982,7 @@ test io-39.12 {Tcl_SetChannelOption, Tcl_GetChannelOption buffer size} {
set x
} 4096
test io-39.13 {Tcl_SetChannelOption, Tcl_GetChannelOption, buffer size} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -buffersize 40000
set x [fconfigure $f -buffersize]
@@ -4990,7 +4990,7 @@ test io-39.13 {Tcl_SetChannelOption, Tcl_GetChannelOption, buffer size} {
set x
} 40000
test io-39.14 {Tcl_SetChannelOption: -encoding, binary & utf-8} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -encoding {}
puts -nonewline $f \xe7\x89\xa6
@@ -5002,7 +5002,7 @@ test io-39.14 {Tcl_SetChannelOption: -encoding, binary & utf-8} {
set x
} \u7266
test io-39.15 {Tcl_SetChannelOption: -encoding, binary & utf-8} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -encoding binary
puts -nonewline $f \xe7\x89\xa6
@@ -5014,13 +5014,13 @@ test io-39.15 {Tcl_SetChannelOption: -encoding, binary & utf-8} {
set x
} \u7266
test io-39.16 {Tcl_SetChannelOption: -encoding, errors} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
set result [list [catch {fconfigure $f -encoding foobar} msg] $msg]
close $f
set result
} {1 {unknown encoding "foobar"}}
-test io-39.17 {Tcl_SetChannelOption: -encoding, clearing CHANNEL_NEED_MORE_DATA} {stdio} {
+test io-39.17 {Tcl_SetChannelOption: -encoding, clearing CHANNEL_NEED_MORE_DATA} {stdio openpipe fileevent} {
set f [open "|[list [interpreter] $path(cat)]" r+]
fconfigure $f -encoding binary
puts -nonewline $f "\xe7"
@@ -5097,7 +5097,7 @@ test io-39.21 {Tcl_SetChannelOption, setting read mode independently} \
} {auto crlf}
test io-39.22 {Tcl_SetChannelOption, invariance} {unixOnly} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w+]
set l ""
lappend l [fconfigure $f1 -eofchar]
@@ -5110,7 +5110,7 @@ test io-39.22 {Tcl_SetChannelOption, invariance} {unixOnly} {
} {{{} {}} {O G} {D D}}
test io-39.22a {Tcl_SetChannelOption, invariance} {
- removeFile test1
+ file delete $path(test1)
set f1 [open $path(test1) w+]
set l [list]
fconfigure $f1 -eofchar {ON GO}
@@ -5142,7 +5142,7 @@ test io-39.24 {Tcl_SetChannelOption, server socket is not readable or
} {{{}} auto}
test io-40.1 {POSIX open access modes: RDWR} {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) w]
puts $f xyzzy
close $f
@@ -5157,7 +5157,7 @@ test io-40.1 {POSIX open access modes: RDWR} {
set x
} {zzy abzzy}
test io-40.2 {POSIX open access modes: CREAT} {unixOnly} {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) {WRONLY CREAT} 0600]
file stat $path(test3) stats
set x [format "0%o" [expr $stats(mode)&0777]]
@@ -5175,14 +5175,14 @@ catch {testConstraint umask2 [expr {[exec umask] == 2}]}
test io-40.3 {POSIX open access modes: CREAT} {unixOnly umask2} {
# This test only works if your umask is 2, like ouster's.
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) {WRONLY CREAT}]
close $f
file stat test3 stats
format "0%o" [expr $stats(mode)&0777]
} 0664
test io-40.4 {POSIX open access modes: CREAT} {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) w]
fconfigure $f -eofchar {}
puts $f xyzzy
@@ -5197,7 +5197,7 @@ test io-40.4 {POSIX open access modes: CREAT} {
set x
} abzzy
test io-40.5 {POSIX open access modes: APPEND} {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) w]
fconfigure $f -translation lf -eofchar {}
puts $f xyzzy
@@ -5218,14 +5218,14 @@ test io-40.5 {POSIX open access modes: APPEND} {
set x
} {{new line} abc}
test io-40.6 {POSIX open access modes: EXCL} -match regexp -body {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) w]
puts $f xyzzy
close $f
open $path(test3) {WRONLY CREAT EXCL}
} -returnCodes error -result {(?i)couldn't open ".*test3": file (already )?exists}
test io-40.7 {POSIX open access modes: EXCL} {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) {WRONLY CREAT EXCL}]
fconfigure $f -eofchar {}
puts $f "A test line"
@@ -5233,7 +5233,7 @@ test io-40.7 {POSIX open access modes: EXCL} {
viewFile test3
} {A test line}
test io-40.8 {POSIX open access modes: TRUNC} {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) w]
puts $f xyzzy
close $f
@@ -5246,7 +5246,7 @@ test io-40.8 {POSIX open access modes: TRUNC} {
set x
} abc
test io-40.9 {POSIX open access modes: NONBLOCK} {nonPortable macOrUnix} {
- removeFile test3
+ file delete $path(test3)
set f [open $path(test3) {WRONLY NONBLOCK CREAT}]
puts $f "NONBLOCK test"
close $f
@@ -5268,11 +5268,11 @@ test io-40.10 {POSIX open access modes: RDONLY} {
[format "channel \"%s\" wasn't opened for writing" $f]]
} 0
test io-40.11 {POSIX open access modes: RDONLY} -match regexp -body {
- removeFile test3
+ file delete $path(test3)
open $path(test3) RDONLY
} -returnCodes error -result {(?i)couldn't open ".*test3": no such file or directory}
test io-40.12 {POSIX open access modes: WRONLY} -match regexp -body {
- removeFile test3
+ file delete $path(test3)
open $path(test3) WRONLY
} -returnCodes error -result {(?i)couldn't open ".*test3": no such file or directory}
test io-40.13 {POSIX open access modes: WRONLY} {
@@ -5288,7 +5288,7 @@ test io-40.13 {POSIX open access modes: WRONLY} {
[list 1 "channel \"$f\" wasn't opened for reading" abzzy]
} 0
test io-40.14 {POSIX open access modes: RDWR} -match regexp -body {
- removeFile test3
+ file delete $path(test3)
open $path(test3) RDWR
} -returnCodes error -result {(?i)couldn't open ".*test3": no such file or directory}
test io-40.15 {POSIX open access modes: RDWR} {
@@ -5301,14 +5301,13 @@ test io-40.15 {POSIX open access modes: RDWR} {
lappend x [viewFile test3]
} {zzy abzzy}
if {![file exists ~/_test_] && [file writable ~]} {
- test io-40.16 {tilde substitution in open} {
- set f [open ~/_test_ w]
- puts $f "Some text"
- close $f
- set x [file exists [file join $env(HOME) _test_]]
- removeFile [file join $env(HOME) _test_]
- set x
- } 1
+ test io-40.16 {tilde substitution in open} -setup {
+ makeFile {Some text} _test_ ~
+ } -body {
+ file exists [file join $env(HOME) _test_]
+ } -cleanup {
+ removeFile _test_ ~
+ } -result 1
}
test io-40.17 {tilde substitution in open} {
set home $env(HOME)
@@ -5318,19 +5317,19 @@ test io-40.17 {tilde substitution in open} {
set x
} {1 {couldn't find HOME environment variable to expand path}}
-test io-41.1 {Tcl_FileeventCmd: errors} {
+test io-41.1 {Tcl_FileeventCmd: errors} {fileevent} {
list [catch {fileevent foo} msg] $msg
} {1 {wrong # args: should be "fileevent channelId event ?script?"}}
-test io-41.2 {Tcl_FileeventCmd: errors} {
+test io-41.2 {Tcl_FileeventCmd: errors} {fileevent} {
list [catch {fileevent foo bar baz q} msg] $msg
} {1 {wrong # args: should be "fileevent channelId event ?script?"}}
-test io-41.3 {Tcl_FileeventCmd: errors} {
+test io-41.3 {Tcl_FileeventCmd: errors} {fileevent} {
list [catch {fileevent gorp readable} msg] $msg
} {1 {can not find channel named "gorp"}}
-test io-41.4 {Tcl_FileeventCmd: errors} {
+test io-41.4 {Tcl_FileeventCmd: errors} {fileevent} {
list [catch {fileevent gorp writable} msg] $msg
} {1 {can not find channel named "gorp"}}
-test io-41.5 {Tcl_FileeventCmd: errors} {
+test io-41.5 {Tcl_FileeventCmd: errors} {fileevent} {
list [catch {fileevent gorp who-knows} msg] $msg
} {1 {bad event name "who-knows": must be readable or writable}}
@@ -5341,10 +5340,10 @@ test io-41.5 {Tcl_FileeventCmd: errors} {
set path(foo) [makeFile {} foo]
set f [open $path(foo) w+]
-test io-42.1 {Tcl_FileeventCmd: creating, deleting, querying} {
+test io-42.1 {Tcl_FileeventCmd: creating, deleting, querying} {fileevent} {
list [fileevent $f readable] [fileevent $f writable]
} {{} {}}
-test io-42.2 {Tcl_FileeventCmd: replacing} {
+test io-42.2 {Tcl_FileeventCmd: replacing} {fileevent} {
set result {}
fileevent $f r "first script"
lappend result [fileevent $f readable]
@@ -5355,7 +5354,7 @@ test io-42.2 {Tcl_FileeventCmd: replacing} {
fileevent $f r ""
lappend result [fileevent $f readable]
} {{first script} {new script} {yet another} {}}
-test io-42.3 {Tcl_FileeventCmd: replacing, with NULL chars in script} {
+test io-42.3 {Tcl_FileeventCmd: replacing, with NULL chars in script} {fileevent} {
set result {}
fileevent $f r "first scr\0ipt"
lappend result [string length [fileevent $f readable]]
@@ -5370,11 +5369,12 @@ test io-42.3 {Tcl_FileeventCmd: replacing, with NULL chars in script} {
#
# Test fileevent on a pipe
#
-
+if {[testConstraint openpipe]} {
catch {set f2 [open "|[list cat -u]" r+]}
catch {set f3 [open "|[list cat -u]" r+]}
+}
-test io-43.1 {Tcl_FileeventCmd: creating, deleting, querying} {stdio unixExecs} {
+test io-43.1 {Tcl_FileeventCmd: creating, deleting, querying} {stdio unixExecs fileevent} {
set result {}
fileevent $f readable "script 1"
lappend result [fileevent $f readable] [fileevent $f writable]
@@ -5385,7 +5385,7 @@ test io-43.1 {Tcl_FileeventCmd: creating, deleting, querying} {stdio unixExecs}
fileevent $f writable {}
lappend result [fileevent $f readable] [fileevent $f writable]
} {{script 1} {} {script 1} {write script} {} {write script} {} {}}
-test io-43.2 {Tcl_FileeventCmd: deleting when many present} {stdio unixExecs} {
+test io-43.2 {Tcl_FileeventCmd: deleting when many present} {stdio unixExecs fileevent} {
set result {}
lappend result [fileevent $f r] [fileevent $f2 r] [fileevent $f3 r]
fileevent $f r "read f"
@@ -5400,7 +5400,7 @@ test io-43.2 {Tcl_FileeventCmd: deleting when many present} {stdio unixExecs} {
lappend result [fileevent $f r] [fileevent $f2 r] [fileevent $f3 r]
} {{} {} {} {read f} {read f2} {read f3} {read f} {} {read f3} {read f} {} {} {} {} {}}
-test io-44.1 {FileEventProc procedure: normal read event} {stdio unixExecs} {
+test io-44.1 {FileEventProc procedure: normal read event} {stdio unixExecs fileevent} {
fileevent $f2 readable [namespace code {
set x [gets $f2]; fileevent $f2 readable {}
}]
@@ -5409,7 +5409,7 @@ test io-44.1 {FileEventProc procedure: normal read event} {stdio unixExecs} {
vwait [namespace which -variable x]
set x
} {text}
-test io-44.2 {FileEventProc procedure: error in read event} {stdio unixExecs} {
+test io-44.2 {FileEventProc procedure: error in read event} {stdio unixExecs fileevent} {
proc ::bgerror args "set [namespace which -variable x] \$args"
fileevent $f2 readable {error bogus}
puts $f2 text; flush $f2
@@ -5418,7 +5418,7 @@ test io-44.2 {FileEventProc procedure: error in read event} {stdio unixExecs} {
rename ::bgerror {}
list $x [fileevent $f2 readable]
} {bogus {}}
-test io-44.3 {FileEventProc procedure: normal write event} {stdio unixExecs} {
+test io-44.3 {FileEventProc procedure: normal write event} {stdio unixExecs fileevent} {
fileevent $f2 writable [namespace code {
lappend x "triggered"
incr count -1
@@ -5433,7 +5433,7 @@ test io-44.3 {FileEventProc procedure: normal write event} {stdio unixExecs} {
vwait [namespace which -variable x]
set x
} {initial triggered triggered triggered}
-test io-44.4 {FileEventProc procedure: eror in write event} {stdio unixExecs} {
+test io-44.4 {FileEventProc procedure: eror in write event} {stdio unixExecs fileevent} {
proc ::bgerror args "set [namespace which -variable x] \$args"
fileevent $f2 writable {error bad-write}
variable x initial
@@ -5441,7 +5441,7 @@ test io-44.4 {FileEventProc procedure: eror in write event} {stdio unixExecs} {
rename ::bgerror {}
list $x [fileevent $f2 writable]
} {bad-write {}}
-test io-44.5 {FileEventProc procedure: end of file} {stdio unixExecs} {
+test io-44.5 {FileEventProc procedure: end of file} {stdio unixExecs openpipe fileevent} {
set f4 [open "|[list [interpreter] $path(cat) << foo]" r]
fileevent $f4 readable [namespace code {
if {[gets $f4 line] < 0} {
@@ -5464,7 +5464,7 @@ catch {close $f3}
close $f
makeFile "foo bar" foo
-test io-45.1 {DeleteFileEvent, cleanup on close} {
+test io-45.1 {DeleteFileEvent, cleanup on close} {fileevent} {
set f [open $path(foo) r]
fileevent $f readable [namespace code {
lappend x "binding triggered: \"[gets $f]\""
@@ -5477,7 +5477,7 @@ test io-45.1 {DeleteFileEvent, cleanup on close} {
vwait [namespace which -variable y]
set x
} {initial}
-test io-45.2 {DeleteFileEvent, cleanup on close} {
+test io-45.2 {DeleteFileEvent, cleanup on close} {fileevent} {
set f [open $path(foo) r]
set f2 [open $path(foo) r]
fileevent $f readable [namespace code {
@@ -5494,7 +5494,7 @@ test io-45.2 {DeleteFileEvent, cleanup on close} {
close $f2
set x
} {initial {f2 triggered: "foo bar"}}
-test io-45.3 {DeleteFileEvent, cleanup on close} {
+test io-45.3 {DeleteFileEvent, cleanup on close} {fileevent} {
set f [open $path(foo) r]
set f2 [open $path(foo) r]
set f3 [open $path(foo) r]
@@ -5519,7 +5519,7 @@ test io-45.3 {DeleteFileEvent, cleanup on close} {
# Execute these tests only if the "testfevent" command is present.
testConstraint testfevent [llength [info commands testfevent]]
-test io-46.1 {Tcl event loop vs multiple interpreters} {testfevent} {
+test io-46.1 {Tcl event loop vs multiple interpreters} {testfevent fileevent} {
testfevent create
testfevent cmd [format {
set f [open {%s} r]
@@ -5557,7 +5557,7 @@ test io-46.3 {Tcl event loop vs multiple interpreters} testfevent {
}
} {0 0 {0 timer}}
-test io-47.1 {fileevent vs multiple interpreters} testfevent {
+test io-47.1 {fileevent vs multiple interpreters} {testfevent fileevent} {
set f [open $path(foo) r]
set f2 [open $path(foo) r]
set f3 [open $path(foo) r]
@@ -5576,7 +5576,7 @@ test io-47.1 {fileevent vs multiple interpreters} testfevent {
close $f3
set x
} {{} {script 1} {} {sript 3}}
-test io-47.2 {deleting fileevent on interpreter delete} testfevent {
+test io-47.2 {deleting fileevent on interpreter delete} {testfevent fileevent} {
set f [open $path(foo) r]
set f2 [open $path(foo) r]
set f3 [open $path(foo) r]
@@ -5597,7 +5597,7 @@ test io-47.2 {deleting fileevent on interpreter delete} testfevent {
close $f4
set x
} {{script 1} {} {} {script 4}}
-test io-47.3 {deleting fileevent on interpreter delete} testfevent {
+test io-47.3 {deleting fileevent on interpreter delete} {testfevent fileevent} {
set f [open $path(foo) r]
set f2 [open $path(foo) r]
set f3 [open $path(foo) r]
@@ -5618,7 +5618,7 @@ test io-47.3 {deleting fileevent on interpreter delete} testfevent {
close $f4
set x
} {{script 1} {script 2} {} {}}
-test io-47.4 {file events on shared files and multiple interpreters} testfevent {
+test io-47.4 {file events on shared files and multiple interpreters} {testfevent fileevent} {
set f [open $path(foo) r]
set f2 [open $path(foo) r]
testfevent create
@@ -5634,7 +5634,7 @@ test io-47.4 {file events on shared files and multiple interpreters} testfevent
close $f2
set x
} {{script 3} {script 1} {script 2}}
-test io-47.5 {file events on shared files, deleting file events} testfevent {
+test io-47.5 {file events on shared files, deleting file events} {testfevent fileevent} {
set f [open $path(foo) r]
testfevent create
testfevent share $f
@@ -5647,7 +5647,7 @@ test io-47.5 {file events on shared files, deleting file events} testfevent {
close $f
set x
} {{} {script 2}}
-test io-47.6 {file events on shared files, deleting file events} testfevent {
+test io-47.6 {file events on shared files, deleting file events} {testfevent fileevent} {
set f [open $path(foo) r]
testfevent create
testfevent share $f
@@ -5663,7 +5663,7 @@ test io-47.6 {file events on shared files, deleting file events} testfevent {
set path(bar) [makeFile {} bar]
-test io-48.1 {testing readability conditions} {
+test io-48.1 {testing readability conditions} {fileevent} {
set f [open $path(bar) w]
puts $f abcdefg
puts $f abcdefg
@@ -5689,7 +5689,7 @@ test io-48.1 {testing readability conditions} {
vwait [namespace which -variable x]
list $x $l
} {done {called called called called called called called}}
-test io-48.2 {testing readability conditions} {nonBlockFiles} {
+test io-48.2 {testing readability conditions} {nonBlockFiles fileevent} {
set f [open $path(bar) w]
puts $f abcdefg
puts $f abcdefg
@@ -5719,7 +5719,7 @@ test io-48.2 {testing readability conditions} {nonBlockFiles} {
set path(my_script) [makeFile {} my_script]
-test io-48.3 {testing readability conditions} {stdio unixOnly nonBlockFiles} {
+test io-48.3 {testing readability conditions} {stdio unixOnly nonBlockFiles openpipe fileevent} {
set f [open $path(bar) w]
puts $f abcdefg
puts $f abcdefg
@@ -5764,8 +5764,8 @@ test io-48.3 {testing readability conditions} {stdio unixOnly nonBlockFiles} {
close $f
list $x $l
} {done {0 1 0 1 0 1 0 1 0 1 0 1 0 0}}
-test io-48.4 {lf write, testing readability, ^Z termination, auto read mode} {
- removeFile test1
+test io-48.4 {lf write, testing readability, ^Z termination, auto read mode} {fileevent} {
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set c [format "abc\ndef\n%c" 26]
@@ -5792,8 +5792,8 @@ test io-48.4 {lf write, testing readability, ^Z termination, auto read mode} {
vwait [namespace which -variable x]
list $c $l
} {3 {abc def {}}}
-test io-48.5 {lf write, testing readability, ^Z in middle, auto read mode} {
- removeFile test1
+test io-48.5 {lf write, testing readability, ^Z in middle, auto read mode} {fileevent} {
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set c [format "abc\ndef\n%cfoo\nbar\n" 26]
@@ -5820,8 +5820,8 @@ test io-48.5 {lf write, testing readability, ^Z in middle, auto read mode} {
vwait [namespace which -variable x]
list $c $l
} {3 {abc def {}}}
-test io-48.6 {cr write, testing readability, ^Z termination, auto read mode} {
- removeFile test1
+test io-48.6 {cr write, testing readability, ^Z termination, auto read mode} {fileevent} {
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
set c [format "abc\ndef\n%c" 26]
@@ -5848,8 +5848,8 @@ test io-48.6 {cr write, testing readability, ^Z termination, auto read mode} {
vwait [namespace which -variable x]
list $c $l
} {3 {abc def {}}}
-test io-48.7 {cr write, testing readability, ^Z in middle, auto read mode} {
- removeFile test1
+test io-48.7 {cr write, testing readability, ^Z in middle, auto read mode} {fileevent} {
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
set c [format "abc\ndef\n%cfoo\nbar\n" 26]
@@ -5876,8 +5876,8 @@ test io-48.7 {cr write, testing readability, ^Z in middle, auto read mode} {
vwait [namespace which -variable x]
list $c $l
} {3 {abc def {}}}
-test io-48.8 {crlf write, testing readability, ^Z termination, auto read mode} {
- removeFile test1
+test io-48.8 {crlf write, testing readability, ^Z termination, auto read mode} {fileevent} {
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
set c [format "abc\ndef\n%c" 26]
@@ -5904,8 +5904,8 @@ test io-48.8 {crlf write, testing readability, ^Z termination, auto read mode} {
vwait [namespace which -variable x]
list $c $l
} {3 {abc def {}}}
-test io-48.9 {crlf write, testing readability, ^Z in middle, auto read mode} {
- removeFile test1
+test io-48.9 {crlf write, testing readability, ^Z in middle, auto read mode} {fileevent} {
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
set c [format "abc\ndef\n%cfoo\nbar\n" 26]
@@ -5932,8 +5932,8 @@ test io-48.9 {crlf write, testing readability, ^Z in middle, auto read mode} {
vwait [namespace which -variable x]
list $c $l
} {3 {abc def {}}}
-test io-48.10 {lf write, testing readability, ^Z in middle, lf read mode} {
- removeFile test1
+test io-48.10 {lf write, testing readability, ^Z in middle, lf read mode} {fileevent} {
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set c [format "abc\ndef\n%cfoo\nbar\n" 26]
@@ -5960,8 +5960,8 @@ test io-48.10 {lf write, testing readability, ^Z in middle, lf read mode} {
vwait [namespace which -variable x]
list $c $l
} {3 {abc def {}}}
-test io-48.11 {lf write, testing readability, ^Z termination, lf read mode} {
- removeFile test1
+test io-48.11 {lf write, testing readability, ^Z termination, lf read mode} {fileevent} {
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
set c [format "abc\ndef\n%c" 26]
@@ -5988,8 +5988,8 @@ test io-48.11 {lf write, testing readability, ^Z termination, lf read mode} {
vwait [namespace which -variable x]
list $c $l
} {3 {abc def {}}}
-test io-48.12 {cr write, testing readability, ^Z in middle, cr read mode} {
- removeFile test1
+test io-48.12 {cr write, testing readability, ^Z in middle, cr read mode} {fileevent} {
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
set c [format "abc\ndef\n%cfoo\nbar\n" 26]
@@ -6016,8 +6016,8 @@ test io-48.12 {cr write, testing readability, ^Z in middle, cr read mode} {
vwait [namespace which -variable x]
list $c $l
} {3 {abc def {}}}
-test io-48.13 {cr write, testing readability, ^Z termination, cr read mode} {
- removeFile test1
+test io-48.13 {cr write, testing readability, ^Z termination, cr read mode} {fileevent} {
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation cr
set c [format "abc\ndef\n%c" 26]
@@ -6044,8 +6044,8 @@ test io-48.13 {cr write, testing readability, ^Z termination, cr read mode} {
vwait [namespace which -variable x]
list $c $l
} {3 {abc def {}}}
-test io-48.14 {crlf write, testing readability, ^Z in middle, crlf read mode} {
- removeFile test1
+test io-48.14 {crlf write, testing readability, ^Z in middle, crlf read mode} {fileevent} {
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
set c [format "abc\ndef\n%cfoo\nbar\n" 26]
@@ -6072,8 +6072,8 @@ test io-48.14 {crlf write, testing readability, ^Z in middle, crlf read mode} {
vwait [namespace which -variable x]
list $c $l
} {3 {abc def {}}}
-test io-48.15 {crlf write, testing readability, ^Z termi, crlf read mode} {
- removeFile test1
+test io-48.15 {crlf write, testing readability, ^Z termi, crlf read mode} {fileevent} {
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation crlf
set c [format "abc\ndef\n%c" 26]
@@ -6102,7 +6102,7 @@ test io-48.15 {crlf write, testing readability, ^Z termi, crlf read mode} {
} {3 {abc def {}}}
test io-49.1 {testing crlf reading, leftover cr disgorgment} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts -nonewline $f "a\rb\rc\r\n"
@@ -6131,7 +6131,7 @@ test io-49.1 {testing crlf reading, leftover cr disgorgment} {
} "7 a 1 [list \r] 2 b 3 [list \r] 4 c 5 {
} 7 0 {} 1"
test io-49.2 {testing crlf reading, leftover cr disgorgment} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts -nonewline $f "a\rb\rc\r\n"
@@ -6154,7 +6154,7 @@ test io-49.2 {testing crlf reading, leftover cr disgorgment} {
set l
} "7 [list a\r] 2 [list b\r] 4 [list c\n] 7 0 {} 7 1"
test io-49.3 {testing crlf reading, leftover cr disgorgment} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts -nonewline $f "a\rb\rc\r\n"
@@ -6175,7 +6175,7 @@ test io-49.3 {testing crlf reading, leftover cr disgorgment} {
set l
} "7 [list a\rb] 3 [list \rc\n] 7 0 {} 7 1"
test io-49.4 {testing crlf reading, leftover cr disgorgment} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts -nonewline $f "a\rb\rc\r\n"
@@ -6196,7 +6196,7 @@ test io-49.4 {testing crlf reading, leftover cr disgorgment} {
set l
} "7 [list a\rb] 3 [list \rc] 7 0 {} 7 1"
test io-49.5 {testing crlf reading, leftover cr disgorgment} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
fconfigure $f -translation lf
puts -nonewline $f "a\rb\rc\r\n"
@@ -6216,7 +6216,7 @@ test io-49.5 {testing crlf reading, leftover cr disgorgment} {
testConstraint testchannelevent [llength [info commands testchannelevent]]
test io-50.1 {testing handler deletion} {testchannelevent} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
close $f
set f [open $path(test1) r]
@@ -6232,7 +6232,7 @@ test io-50.1 {testing handler deletion} {testchannelevent} {
set z
} called
test io-50.2 {testing handler deletion with multiple handlers} {testchannelevent} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
close $f
set f [open $path(test1) r]
@@ -6250,7 +6250,7 @@ test io-50.2 {testing handler deletion with multiple handlers} {testchannelevent
[list [list called delhandler $f 0] [list called delhandler $f 1]]
} 0
test io-50.3 {testing handler deletion with multiple handlers} {testchannelevent} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
close $f
set f [open $path(test1) r]
@@ -6276,7 +6276,7 @@ test io-50.3 {testing handler deletion with multiple handlers} {testchannelevent
[list delhandler $f 0 deleted myself]]
} 0
test io-50.4 {testing handler deletion vs reentrant calls} {testchannelevent} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
close $f
set f [open $path(test1) r]
@@ -6301,7 +6301,7 @@ test io-50.4 {testing handler deletion vs reentrant calls} {testchannelevent} {
{{delrecursive calling recursive} {delrecursive deleting recursive}}
} 0
test io-50.5 {testing handler deletion vs reentrant calls} {testchannelevent} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
close $f
set f [open $path(test1) r]
@@ -6335,7 +6335,7 @@ test io-50.5 {testing handler deletion vs reentrant calls} {testchannelevent} {
{del deleted myself} {del after update}]
} 0
test io-50.6 {testing handler deletion vs reentrant calls} {testchannelevent} {
- removeFile test1
+ file delete $path(test1)
set f [open $path(test1) w]
close $f
set f [open $path(test1) r]
@@ -6417,8 +6417,8 @@ test io-51.1 {Test old socket deletion on Macintosh} {socket} {
set result
} {sock1 sock2 sock3 sock4}
-test io-52.1 {TclCopyChannel} {
- removeFile test1
+test io-52.1 {TclCopyChannel} {fcopy} {
+ file delete $path(test1)
set f1 [open $thisScript]
set f2 [open $path(test1) w]
fcopy $f1 $f2 -command { # }
@@ -6427,8 +6427,8 @@ test io-52.1 {TclCopyChannel} {
close $f2
string compare $msg "channel \"$f1\" is busy"
} {0}
-test io-52.2 {TclCopyChannel} {
- removeFile test1
+test io-52.2 {TclCopyChannel} {fcopy} {
+ file delete $path(test1)
set f1 [open $thisScript]
set f2 [open $path(test1) w]
set f3 [open $thisScript]
@@ -6439,8 +6439,8 @@ test io-52.2 {TclCopyChannel} {
close $f3
string compare $msg "channel \"$f2\" is busy"
} {0}
-test io-52.3 {TclCopyChannel} {
- removeFile test1
+test io-52.3 {TclCopyChannel} {fcopy} {
+ file delete $path(test1)
set f1 [open $thisScript]
set f2 [open $path(test1) w]
fconfigure $f1 -translation lf -blocking 0
@@ -6456,8 +6456,8 @@ test io-52.3 {TclCopyChannel} {
}
set result
} {0 0 ok}
-test io-52.4 {TclCopyChannel} {
- removeFile test1
+test io-52.4 {TclCopyChannel} {fcopy} {
+ file delete $path(test1)
set f1 [open $thisScript]
set f2 [open $path(test1) w]
fconfigure $f1 -translation lf -blocking 0
@@ -6468,8 +6468,8 @@ test io-52.4 {TclCopyChannel} {
close $f2
lappend result [file size $path(test1)]
} {0 0 40}
-test io-52.5 {TclCopyChannel} {
- removeFile test1
+test io-52.5 {TclCopyChannel} {fcopy} {
+ file delete $path(test1)
set f1 [open $thisScript]
set f2 [open $path(test1) w]
fconfigure $f1 -translation lf -blocking 0
@@ -6485,8 +6485,8 @@ test io-52.5 {TclCopyChannel} {
}
set result
} {0 0 ok}
-test io-52.6 {TclCopyChannel} {
- removeFile test1
+test io-52.6 {TclCopyChannel} {fcopy} {
+ file delete $path(test1)
set f1 [open $thisScript]
set f2 [open $path(test1) w]
fconfigure $f1 -translation lf -blocking 0
@@ -6502,8 +6502,8 @@ test io-52.6 {TclCopyChannel} {
}
set result
} {0 0 ok}
-test io-52.7 {TclCopyChannel} {
- removeFile test1
+test io-52.7 {TclCopyChannel} {fcopy} {
+ file delete $path(test1)
set f1 [open $thisScript]
set f2 [open $path(test1) w]
fconfigure $f1 -translation lf -blocking 0
@@ -6519,9 +6519,9 @@ test io-52.7 {TclCopyChannel} {
}
set result
} {0 0 ok}
-test io-52.8 {TclCopyChannel} {stdio} {
- removeFile test1
- removeFile pipe
+test io-52.8 {TclCopyChannel} {stdio openpipe fcopy} {
+ file delete $path(test1)
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
fconfigure $f1 -translation lf
puts $f1 "
@@ -6557,7 +6557,7 @@ fconfigure $out -encoding koi8-r -translation lf
puts $out "\u0410\u0410"
close $out
-test io-52.9 {TclCopyChannel & encodings} {
+test io-52.9 {TclCopyChannel & encodings} {fcopy} {
# Copy kyrillic to UTF-8, using fcopy.
set in [open $path(kyrillic.txt) r]
@@ -6588,7 +6588,7 @@ test io-52.9 {TclCopyChannel & encodings} {
[file size $path(utf8-rp.txt)]
} {3 5 5}
-test io-52.10 {TclCopyChannel & encodings} {
+test io-52.10 {TclCopyChannel & encodings} {fcopy} {
# encoding to binary (=> implies that the
# internal utf-8 is written)
@@ -6606,7 +6606,7 @@ test io-52.10 {TclCopyChannel & encodings} {
file size $path(utf8-fcopy.txt)
} 5
-test io-52.11 {TclCopyChannel & encodings} {
+test io-52.11 {TclCopyChannel & encodings} {fcopy} {
# binary to encoding => the input has to be
# in utf-8 to make sense to the encoder
@@ -6624,9 +6624,8 @@ test io-52.11 {TclCopyChannel & encodings} {
file size $path(kyrillic.txt)
} 3
-
-test io-53.1 {CopyData} {
- removeFile test1
+test io-53.1 {CopyData} {fcopy} {
+ file delete $path(test1)
set f1 [open $thisScript]
set f2 [open $path(test1) w]
fconfigure $f1 -translation lf -blocking 0
@@ -6637,8 +6636,8 @@ test io-53.1 {CopyData} {
close $f2
lappend result [file size $path(test1)]
} {0 0 0}
-test io-53.2 {CopyData} {
- removeFile test1
+test io-53.2 {CopyData} {fcopy} {
+ file delete $path(test1)
set f1 [open $thisScript]
set f2 [open $path(test1) w]
fconfigure $f1 -translation lf -blocking 0
@@ -6656,9 +6655,9 @@ test io-53.2 {CopyData} {
}
set result
} {0 0 ok}
-test io-53.3 {CopyData: background read underflow} {stdio unixOnly} {
- removeFile test1
- removeFile pipe
+test io-53.3 {CopyData: background read underflow} {stdio unixOnly openpipe fcopy} {
+ file delete $path(test1)
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 [format {
puts ready
@@ -6686,14 +6685,14 @@ test io-53.3 {CopyData: background read underflow} {stdio unixOnly} {
close $f
set result
} "ready line1 line2 {done\n}"
-test io-53.4 {CopyData: background write overflow} {stdio unixOnly} {
+test io-53.4 {CopyData: background write overflow} {stdio unixOnly openpipe fileevent fcopy} {
set big bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n
variable x
for {set x 0} {$x < 12} {incr x} {
append big $big
}
- removeFile test1
- removeFile pipe
+ file delete $path(test1)
+ file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 {
puts ready
@@ -6737,7 +6736,7 @@ proc FcopyTestDone {bytes {error {}}} {
}
}
-test io-53.5 {CopyData: error during fcopy} {socket} {
+test io-53.5 {CopyData: error during fcopy} {socket fcopy} {
variable fcopyTestDone
set listen [socket -server [namespace code FcopyTestAccept] 0]
set in [open $thisScript] ;# 126 K
@@ -6753,10 +6752,10 @@ test io-53.5 {CopyData: error during fcopy} {socket} {
close $out
set fcopyTestDone ;# 1 for error condition
} 1
-test io-53.6 {CopyData: error during fcopy} {stdio} {
+test io-53.6 {CopyData: error during fcopy} {stdio openpipe fcopy} {
variable fcopyTestDone
- removeFile pipe
- removeFile test1
+ file delete $path(pipe)
+ file delete $path(test1)
catch {unset fcopyTestDone}
set f1 [open $path(pipe) w]
puts $f1 "exit 1"
@@ -6790,10 +6789,9 @@ proc doFcopy {in out {bytes 0} {error {}}} {
}
}
-test io-53.7 {CopyData: Flooding fcopy from pipe} {stdio} {
+test io-53.7 {CopyData: Flooding fcopy from pipe} {stdio openpipe fcopy} {
variable fcopyTestDone
- removeFile pipe
- removeFile test1
+ file delete $path(pipe)
catch {unset fcopyTestDone}
set fcopyTestCount 0
set f1 [open $path(pipe) w]
@@ -6826,7 +6824,7 @@ test io-53.7 {CopyData: Flooding fcopy from pipe} {stdio} {
expr ($fcopyTestDone == 0) ? $fcopyTestCount : -1
} {3450}
-test io-54.1 {Recursive channel events} {socket} {
+test io-54.1 {Recursive channel events} {socket fileevent} {
# This test checks to see if file events are delivered during recursive
# event loops when there is buffered data on the channel.
@@ -6880,7 +6878,7 @@ test io-54.1 {Recursive channel events} {socket} {
close $cs
list $result $x
} {{{line 1} 1 2} 2}
-test io-54.2 {Testing for busy-wait in recursive channel events} {socket} {
+test io-54.2 {Testing for busy-wait in recursive channel events} {socket fileevent} {
set accept {}
set after {}
variable s [socket -server [namespace code accept] 0]
@@ -6942,7 +6940,7 @@ test io-54.2 {Testing for busy-wait in recursive channel events} {socket} {
set path(fooBar) [makeFile {} fooBar]
-test io-55.1 {ChannelEventScriptInvoker: deletion} {
+test io-55.1 {ChannelEventScriptInvoker: deletion} {fileevent} {
variable x
proc eventScript {fd} {
variable x
@@ -6979,7 +6977,7 @@ test io-56.1 {ChannelTimerProc} {testchannelevent} {
lappend result $y
} {2 done}
-test io-57.1 {buffered data and file events, gets} {
+test io-57.1 {buffered data and file events, gets} {fileevent} {
proc accept {sock args} {
variable s2
set s2 $sock
@@ -7002,7 +7000,7 @@ test io-57.1 {buffered data and file events, gets} {
close $server
set result
} {12 readable 34567890 timer}
-test io-57.2 {buffered data and file events, read} {
+test io-57.2 {buffered data and file events, read} {fileevent} {
proc accept {sock args} {
variable s2
set s2 $sock
@@ -7026,7 +7024,7 @@ test io-57.2 {buffered data and file events, read} {
set result
} {1 readable 234567890 timer}
-test io-58.1 {Tcl_NotifyChannel and error when closing} {stdio unixOrPc} {
+test io-58.1 {Tcl_NotifyChannel and error when closing} {stdio unixOrPc openpipe fileevent} {
set out [open $path(script) w]
puts $out {
puts "normal message from pipe"
@@ -7069,7 +7067,7 @@ test io-59.1 {Thread reference of channels} {testmainthread testchannel} {
} {1}
-test io-60.1 {writing illegal utf sequences} {
+test io-60.1 {writing illegal utf sequences} {openpipe fileevent} {
# This test will hang in older revisions of the core.
set out [open $path(script) w]
@@ -7105,7 +7103,7 @@ test io-60.1 {writing illegal utf sequences} {
# cleanup
foreach file [list fooBar longfile script output test1 pipe my_script foo \
- bar test2 test3 cat stdout] {
+ bar test2 test3 cat stdout kyrillic.txt utf8-fcopy.txt utf8-rp.txt] {
removeFile $file
}
cleanupTests