OSDN Git Service

c668299cfa41ada586bc8ac5cccf57016fb13643
[pf3gnuchains/sourceware.git] / tcl / tests / ioCmd.test
1 # Commands covered: open, close, gets, read, puts, seek, tell, eof, flush,
2 #                   fblocked, fconfigure, open, channel, fcopy
3 #
4 # This file contains a collection of tests for one or more of the Tcl
5 # built-in commands.  Sourcing this file into Tcl runs the tests and
6 # generates output for errors.  No output means no errors were found.
7 #
8 # Copyright (c) 1991-1994 The Regents of the University of California.
9 # Copyright (c) 1994-1996 Sun Microsystems, Inc.
10 # Copyright (c) 1998-1999 by Scriptics Corporation.
11 #
12 # See the file "license.terms" for information on usage and redistribution
13 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
14 #
15 # RCS: @(#) $Id$
16
17 if {[lsearch [namespace children] ::tcltest] == -1} {
18     package require tcltest
19     namespace import -force ::tcltest::*
20 }
21
22 removeFile test1
23 removeFile pipe
24
25 set executable [list [info nameofexecutable]]
26
27 test iocmd-1.1 {puts command} {
28    list [catch {puts} msg] $msg
29 } {1 {wrong # args: should be "puts ?-nonewline? ?channelId? string"}}
30 test iocmd-1.2 {puts command} {
31    list [catch {puts a b c d e f g} msg] $msg
32 } {1 {wrong # args: should be "puts ?-nonewline? ?channelId? string"}}
33 test iocmd-1.3 {puts command} {
34    list [catch {puts froboz -nonewline kablooie} msg] $msg
35 } {1 {bad argument "kablooie": should be "nonewline"}}
36 test iocmd-1.4 {puts command} {
37    list [catch {puts froboz hello} msg] $msg
38 } {1 {can not find channel named "froboz"}}
39 test iocmd-1.5 {puts command} {
40    list [catch {puts stdin hello} msg] $msg
41 } {1 {channel "stdin" wasn't opened for writing}}
42 test iocmd-1.6 {puts command} {
43     set f [open test1 w]
44     fconfigure $f -translation lf -eofchar {}
45     puts -nonewline $f foobar
46     close $f
47     file size test1
48 } 6
49 test iocmd-1.7 {puts command} {
50     set f [open test1 w]
51     fconfigure $f -translation lf -eofchar {}
52     puts $f foobar
53     close $f
54     file size test1
55 } 7
56 test iocmd-1.8 {puts command} {
57     set f [open test1 w]
58     fconfigure $f -translation lf -eofchar {}
59     puts -nonewline $f [binary format a4a5 foo bar]
60     close $f
61     file size test1
62 } 9
63
64
65 test iocmd-2.1 {flush command} {
66    list [catch {flush} msg] $msg
67 } {1 {wrong # args: should be "flush channelId"}}
68 test iocmd-2.2 {flush command} {
69    list [catch {flush a b c d e} msg] $msg
70 } {1 {wrong # args: should be "flush channelId"}}
71 test iocmd-2.3 {flush command} {
72    list [catch {flush foo} msg] $msg
73 } {1 {can not find channel named "foo"}}
74 test iocmd-2.4 {flush command} {
75    list [catch {flush stdin} msg] $msg
76 } {1 {channel "stdin" wasn't opened for writing}}
77
78 test iocmd-3.1 {gets command} {
79    list [catch {gets} msg] $msg
80 } {1 {wrong # args: should be "gets channelId ?varName?"}}
81 test iocmd-3.2 {gets command} {
82    list [catch {gets a b c d e f g} msg] $msg
83 } {1 {wrong # args: should be "gets channelId ?varName?"}}
84 test iocmd-3.3 {gets command} {
85    list [catch {gets aaa} msg] $msg
86 } {1 {can not find channel named "aaa"}}
87 test iocmd-3.4 {gets command} {
88    list [catch {gets stdout} msg] $msg
89 } {1 {channel "stdout" wasn't opened for reading}}
90 test iocmd-3.5 {gets command} {
91     set f [open test1 w]
92     puts $f [binary format a4a5 foo bar]
93     close $f
94     set f [open test1 r]
95     set result [gets $f]
96     close $f
97     set x foo\x00
98     set x "${x}bar\x00\x00"
99     string compare $x $result
100 } 0
101
102 test iocmd-4.1 {read command} {
103    list [catch {read} msg] $msg
104 } {1 {wrong # args: should be "read channelId ?numChars?" or "read ?-nonewline? channelId"}}
105 test iocmd-4.2 {read command} {
106    list [catch {read a b c d e f g h} msg] $msg
107 } {1 {wrong # args: should be "read channelId ?numChars?" or "read ?-nonewline? channelId"}}
108 test iocmd-4.3 {read command} {
109    list [catch {read aaa} msg] $msg
110 } {1 {can not find channel named "aaa"}}
111 test iocmd-4.4 {read command} {
112    list [catch {read -nonewline} msg] $msg
113 } {1 {wrong # args: should be "read channelId ?numChars?" or "read ?-nonewline? channelId"}}
114 test iocmd-4.5 {read command} {
115    list [catch {read -nonew file4} msg] $msg $errorCode
116 } {1 {can not find channel named "-nonew"} NONE}
117 test iocmd-4.6 {read command} {
118    list [catch {read stdout} msg] $msg
119 } {1 {channel "stdout" wasn't opened for reading}}
120 test iocmd-4.7 {read command} {
121    list [catch {read -nonewline stdout} msg] $msg
122 } {1 {channel "stdout" wasn't opened for reading}}
123 test iocmd-4.8 {read command with incorrect combination of arguments} {
124     removeFile test1
125     set f [open test1 w]
126     puts $f "Two lines: this one"
127     puts $f "and this one"
128     close $f
129     set f [open test1]
130     set x [list [catch {read -nonewline $f 20 z} msg] $msg $errorCode]
131     close $f
132     set x
133 } {1 {wrong # args: should be "read channelId ?numChars?" or "read ?-nonewline? channelId"} NONE}
134 test iocmd-4.9 {read command} {
135     list [catch {read stdin foo} msg] $msg $errorCode
136 } {1 {bad argument "foo": should be "nonewline"} NONE}
137 test iocmd-4.10 {read command} {
138     list [catch {read file107} msg] $msg $errorCode
139 } {1 {can not find channel named "file107"} NONE}
140 test iocmd-4.11 {read command} {
141     set f [open test3 w]
142     set x [list [catch {read $f} msg] $msg $errorCode]
143     close $f
144     string compare [string tolower $x] \
145         [list 1 [format "channel \"%s\" wasn't opened for reading" $f] none]
146 } 0
147 test iocmd-4.12 {read command} {
148     set f [open test1]
149     set x [list [catch {read $f 12z} msg] $msg $errorCode]
150     close $f
151     set x
152 } {1 {expected integer but got "12z"} NONE}
153
154 test iocmd-5.1 {seek command} {
155     list [catch {seek} msg] $msg
156 } {1 {wrong # args: should be "seek channelId offset ?origin?"}}
157 test iocmd-5.2 {seek command} {
158     list [catch {seek a b c d e f g} msg] $msg
159 } {1 {wrong # args: should be "seek channelId offset ?origin?"}}
160 test iocmd-5.3 {seek command} {
161     list [catch {seek stdin gugu} msg] $msg
162 } {1 {expected integer but got "gugu"}}
163 test iocmd-5.4 {seek command} {
164     list [catch {seek stdin 100 gugu} msg] $msg
165 } {1 {bad origin "gugu": must be start, current, or end}}
166
167 test iocmd-6.1 {tell command} {
168     list [catch {tell} msg] $msg
169 } {1 {wrong # args: should be "tell channelId"}}
170 test iocmd-6.2 {tell command} {
171     list [catch {tell a b c d e} msg] $msg
172 } {1 {wrong # args: should be "tell channelId"}}
173 test iocmd-6.3 {tell command} {
174     list [catch {tell aaa} msg] $msg
175 } {1 {can not find channel named "aaa"}}
176
177 test iocmd-7.1 {close command} {
178     list [catch {close} msg] $msg
179 } {1 {wrong # args: should be "close channelId"}}
180 test iocmd-7.2 {close command} {
181     list [catch {close a b c d e} msg] $msg
182 } {1 {wrong # args: should be "close channelId"}}
183 test iocmd-7.3 {close command} {
184     list [catch {close aaa} msg] $msg
185 } {1 {can not find channel named "aaa"}}
186
187 test iocmd-8.1 {fconfigure command} {
188     list [catch {fconfigure} msg] $msg
189 } {1 {wrong # args: should be "fconfigure channelId ?optionName? ?value? ?optionName value?..."}}
190 test iocmd-8.2 {fconfigure command} {
191     list [catch {fconfigure a b c d e f} msg] $msg
192 } {1 {wrong # args: should be "fconfigure channelId ?optionName? ?value? ?optionName value?..."}}
193 test iocmd-8.3 {fconfigure command} {
194     list [catch {fconfigure a b} msg] $msg
195 } {1 {can not find channel named "a"}}
196 test iocmd-8.4 {fconfigure command} {
197     removeFile test1
198     set f1 [open test1 w]
199     set x [list [catch {fconfigure $f1 froboz} msg] $msg]
200     close $f1
201     set x
202 } {1 {bad option "froboz": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}}
203 test iocmd-8.5 {fconfigure command} {
204     list [catch {fconfigure stdin -buffering froboz} msg] $msg
205 } {1 {bad value for -buffering: must be one of full, line, or none}}
206 test iocmd-8.6 {fconfigure command} {
207     list [catch {fconfigure stdin -translation froboz} msg] $msg
208 } {1 {bad value for -translation: must be one of auto, binary, cr, lf, crlf, or platform}}
209 test iocmd-8.7 {fconfigure command} {
210     removeFile test1
211     set f1 [open test1 w]
212     fconfigure $f1 -translation lf -eofchar {} -encoding unicode
213     set x [fconfigure $f1]
214     close $f1
215     set x
216 } {-blocking 1 -buffering full -buffersize 4096 -encoding unicode -eofchar {} -translation lf}
217 test iocmd-8.8 {fconfigure command} {
218     removeFile test1
219     set f1 [open test1 w]
220     fconfigure $f1 -translation lf -buffering line -buffersize 3030 \
221                 -eofchar {} -encoding unicode
222     set x ""
223     lappend x [fconfigure $f1 -buffering]
224     lappend x [fconfigure $f1]
225     close $f1
226     set x
227 } {line {-blocking 1 -buffering line -buffersize 3030 -encoding unicode -eofchar {} -translation lf}}
228 test iocmd-8.9 {fconfigure command} {
229     removeFile test1
230     set f1 [open test1 w]
231     fconfigure $f1 -translation binary -buffering none -buffersize 4040 \
232                 -eofchar {} -encoding binary
233     set x [fconfigure $f1]
234     close $f1
235     set x
236 } {-blocking 1 -buffering none -buffersize 4040 -encoding binary -eofchar {} -translation lf}
237 test iocmd-8.10 {fconfigure command} {
238     list [catch {fconfigure a b} msg] $msg
239 } {1 {can not find channel named "a"}}
240 test iocmd-8.11 {fconfigure command} {
241     list [catch {fconfigure stdout -froboz blarfo} msg] $msg
242 } {1 {bad option "-froboz": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}}
243 test iocmd-8.12 {fconfigure command} {
244     list [catch {fconfigure stdout -b blarfo} msg] $msg
245 } {1 {bad option "-b": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}}
246 test iocmd-8.13 {fconfigure command} {
247     list [catch {fconfigure stdout -buffer blarfo} msg] $msg
248 } {1 {bad option "-buffer": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation}}
249 test iocmd-8.14 {fconfigure command} {
250     fconfigure stdin -buffers
251 } 4096
252 proc iocmdSSETUP {} {
253   uplevel {
254         set srv [socket -server iocmdSRV 0];
255         set port [lindex [fconfigure $srv -sockname] 2];
256         proc iocmdSRV {sock ip port} {close $sock}
257         set cli [socket 127.0.0.1 $port];
258   }
259 }
260 proc iocmdSSHTDWN {} {
261   uplevel {
262         close $cli;
263         close $srv;
264         unset cli srv port
265         rename iocmdSRV {}
266   }
267 }
268
269 test iocmd-8.15 {fconfigure command / tcp channel} {socket} {
270         iocmdSSETUP
271         set r [list [catch {fconfigure $cli -blah} msg] $msg];
272         iocmdSSHTDWN
273         set r;
274 } {1 {bad option "-blah": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, -peername, or -sockname}}
275 test iocmd-8.16 {fconfigure command / tcp channel} {socket} {
276         iocmdSSETUP
277         set r [expr [lindex [fconfigure $cli -peername] 2]==$port];
278         iocmdSSHTDWN
279         set r
280 } 1
281 test iocmd-8.17 {fconfigure command / tcp channel} {nonPortable} {
282         # It is possible that you don't get the connection reset by peer
283         # error but rather a valid answer. depends of the tcp implementation
284         iocmdSSETUP
285         update;
286         puts $cli "blah"; flush $cli; # that flush could/should fail too
287         update;
288         set r [catch {fconfigure $cli -peername} msg]
289         iocmdSSHTDWN
290         regsub -all {can([^:])+: } $r {} r;
291         set r
292 } 1
293 test iocmd-8.18 {fconfigure command / unix tty channel} {nonPortable unixOnly} {
294         # might fail if /dev/ttya is unavailable
295         set tty [open /dev/ttya]
296         set r [list [catch {fconfigure $tty -blah blih} msg] $msg];
297         close $tty;
298         set r;
299 } {1 {bad option "-blah": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, or -mode}}
300 test iocmd-8.19 {fconfigure command / win tty channel} {nonPortable pcOnly} {
301         # might fail if com1 is unavailable
302         set tty [open com1]
303         set r [list [catch {fconfigure $tty -blah blih} msg] $msg];
304         close $tty;
305         set r;
306 } {1 {bad option "-blah": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, -mode, or -pollinterval}}
307
308 test iocmd-9.1 {eof command} {
309     list [catch {eof} msg] $msg $errorCode
310 } {1 {wrong # args: should be "eof channelId"} NONE}
311 test iocmd-9.2 {eof command} {
312     list [catch {eof a b} msg] $msg $errorCode
313 } {1 {wrong # args: should be "eof channelId"} NONE}
314 test iocmd-9.3 {eof command} {
315     catch {close file100}
316     list [catch {eof file100} msg] $msg $errorCode
317 } {1 {can not find channel named "file100"} NONE}
318
319 # The tests for Tcl_ExecObjCmd are in exec.test
320
321 test iocmd-10.1 {fblocked command} {
322     list [catch {fblocked} msg] $msg
323 } {1 {wrong # args: should be "fblocked channelId"}}
324 test iocmd-10.2 {fblocked command} {
325     list [catch {fblocked a b c d e f g} msg] $msg
326 } {1 {wrong # args: should be "fblocked channelId"}}
327 test iocmd-10.3 {fblocked command} {
328     list [catch {fblocked file1000} msg] $msg
329 } {1 {can not find channel named "file1000"}}
330 test iocmd-10.4 {fblocked command} {
331     list [catch {fblocked stdout} msg] $msg
332 } {1 {channel "stdout" wasn't opened for reading}}
333 test iocmd-10.5 {fblocked command} {
334     fblocked stdin
335 } 0
336
337 removeFile test5
338 test iocmd-11.1 {I/O to command pipelines} {unixOrPc unixExecs} {
339     set f [open test4 w]
340     close $f
341     list [catch {open "| cat < test4 > test5" w} msg] $msg $errorCode
342 } {1 {can't write input to command: standard input was redirected} NONE}
343 test iocmd-11.2 {I/O to command pipelines} {unixOrPc unixExecs} {
344     list [catch {open "| echo > test5" r} msg] $msg $errorCode
345 } {1 {can't read output from command: standard output was redirected} NONE}
346 test iocmd-11.3 {I/O to command pipelines} {unixOrPc unixExecs} {
347     list [catch {open "| echo > test5" r+} msg] $msg $errorCode
348 } {1 {can't read output from command: standard output was redirected} NONE}
349
350 test iocmd-12.1 {POSIX open access modes: RDONLY} {
351     removeFile test1
352     set f [open test1 w]
353     puts $f "Two lines: this one"
354     puts $f "and this one"
355     close $f
356     set f [open test1 RDONLY]
357     set x [list [gets $f] [catch {puts $f Test} msg] $msg]
358     close $f
359     string compare $x \
360         "{Two lines: this one} 1 [list [format "channel \"%s\" wasn't opened for writing" $f]]"
361 } 0
362 test iocmd-12.2 {POSIX open access modes: RDONLY} {
363     removeFile test3
364     string tolower [list [catch {open test3 RDONLY} msg] $msg]
365 } {1 {couldn't open "test3": no such file or directory}}
366 test iocmd-12.3 {POSIX open access modes: WRONLY} {
367     removeFile test3
368     string tolower [list [catch {open test3 WRONLY} msg] $msg]
369 } {1 {couldn't open "test3": no such file or directory}}
370 #
371 # Test 13.4 relies on assigning the same channel name twice.
372 #
373 test iocmd-12.4 {POSIX open access modes: WRONLY} {unixOnly} {
374     removeFile test3
375     set f [open test3 w]
376     fconfigure $f -eofchar {}
377     puts $f xyzzy
378     close $f
379     set f [open test3 WRONLY]
380     fconfigure $f -eofchar {}
381     puts -nonewline $f "ab"
382     seek $f 0 current
383     set x [list [catch {gets $f} msg] $msg]
384     close $f
385     set f [open test3 r]
386     fconfigure $f -eofchar {}
387     lappend x [gets $f]
388     close $f
389     set y [list 1 [format "channel \"%s\" wasn't opened for reading" $f] abzzy]
390     string compare $x $y
391 } 0
392 test iocmd-12.5 {POSIX open access modes: RDWR} {
393     removeFile test3
394     string tolower [list [catch {open test3 RDWR} msg] $msg]
395 } {1 {couldn't open "test3": no such file or directory}}
396 test iocmd-12.6 {POSIX open access modes: errors} {
397     concat [catch {open test3 "FOO \{BAR BAZ"} msg] $msg\n$errorInfo
398 } "1 unmatched open brace in list
399 unmatched open brace in list
400     while processing open access modes \"FOO {BAR BAZ\"
401     invoked from within
402 \"open test3 \"FOO \\{BAR BAZ\"\""
403 test iocmd-12.7 {POSIX open access modes: errors} {
404   list [catch {open test3 {FOO BAR BAZ}} msg] $msg
405 } {1 {invalid access mode "FOO": must be RDONLY, WRONLY, RDWR, APPEND, CREAT EXCL, NOCTTY, NONBLOCK, or TRUNC}}
406 test iocmd-12.8 {POSIX open access modes: errors} {
407     list [catch {open test3 {TRUNC CREAT}} msg] $msg
408 } {1 {access mode must include either RDONLY, WRONLY, or RDWR}}
409
410 test iocmd-13.1 {errors in open command} {
411     list [catch {open} msg] $msg
412 } {1 {wrong # args: should be "open fileName ?access? ?permissions?"}}
413 test iocmd-13.2 {errors in open command} {
414     list [catch {open a b c d} msg] $msg
415 } {1 {wrong # args: should be "open fileName ?access? ?permissions?"}}
416 test iocmd-13.3 {errors in open command} {
417     list [catch {open test1 x} msg] $msg
418 } {1 {illegal access mode "x"}}
419 test iocmd-13.4 {errors in open command} {
420     list [catch {open test1 rw} msg] $msg
421 } {1 {illegal access mode "rw"}}
422 test iocmd-13.5 {errors in open command} {
423     list [catch {open test1 r+1} msg] $msg
424 } {1 {illegal access mode "r+1"}}
425 test iocmd-13.6 {errors in open command} {
426     string tolower [list [catch {open _non_existent_} msg] $msg $errorCode]
427 } {1 {couldn't open "_non_existent_": no such file or directory} {posix enoent {no such file or directory}}}
428
429 test iocmd-14.1 {file id parsing errors} {
430     list [catch {eof gorp} msg] $msg $errorCode
431 } {1 {can not find channel named "gorp"} NONE}
432 test iocmd-14.2 {file id parsing errors} {
433     list [catch {eof filex} msg] $msg
434 } {1 {can not find channel named "filex"}}
435 test iocmd-14.3 {file id parsing errors} {
436     list [catch {eof file12a} msg] $msg
437 } {1 {can not find channel named "file12a"}}
438 test iocmd-14.4 {file id parsing errors} {
439     list [catch {eof file123} msg] $msg
440 } {1 {can not find channel named "file123"}}
441 test iocmd-14.5 {file id parsing errors} {
442     list [catch {eof stdout} msg] $msg
443 } {0 0}
444 test iocmd-14.6 {file id parsing errors} {
445     list [catch {eof stdin} msg] $msg
446 } {0 0}
447 test iocmd-14.7 {file id parsing errors} {
448     list [catch {eof stdout} msg] $msg
449 } {0 0}
450 test iocmd-14.8 {file id parsing errors} {
451     list [catch {eof stderr} msg] $msg
452 } {0 0}
453 test iocmd-14.9 {file id parsing errors} {
454     list [catch {eof stderr1} msg] $msg
455 } {1 {can not find channel named "stderr1"}}
456 set f [open test1 w]
457 close $f
458 set expect "1 {can not find channel named \"$f\"}"
459 test iocmd-14.10 {file id parsing errors} {
460     list [catch {eof $f} msg] $msg
461 } $expect
462
463 test iocmd-15.1 {Tcl_FcopyObjCmd} {
464     list [catch {fcopy} msg] $msg
465 } {1 {wrong # args: should be "fcopy input output ?-size size? ?-command callback?"}}
466 test iocmd-15.2 {Tcl_FcopyObjCmd} {
467     list [catch {fcopy 1} msg] $msg
468 } {1 {wrong # args: should be "fcopy input output ?-size size? ?-command callback?"}}
469 test iocmd-15.3 {Tcl_FcopyObjCmd} {
470     list [catch {fcopy 1 2 3 4 5 6 7} msg] $msg
471 } {1 {wrong # args: should be "fcopy input output ?-size size? ?-command callback?"}}
472 test iocmd-15.4 {Tcl_FcopyObjCmd} {
473     list [catch {fcopy 1 2 3} msg] $msg
474 } {1 {wrong # args: should be "fcopy input output ?-size size? ?-command callback?"}}
475 test iocmd-15.5 {Tcl_FcopyObjCmd} {
476     list [catch {fcopy 1 2 3 4 5} msg] $msg
477 } {1 {wrong # args: should be "fcopy input output ?-size size? ?-command callback?"}}
478 set f [open test1 w]
479 close $f
480 set rfile [open test1 r]
481 set wfile [open test2 w]
482 test iocmd-15.6 {Tcl_FcopyObjCmd} {
483     list [catch {fcopy foo $wfile} msg] $msg
484 } {1 {can not find channel named "foo"}}
485 test iocmd-15.7 {Tcl_FcopyObjCmd} {
486     list [catch {fcopy $rfile foo} msg] $msg
487 } {1 {can not find channel named "foo"}}
488 test iocmd-15.8 {Tcl_FcopyObjCmd} {
489     list [catch {fcopy $wfile $wfile} msg] $msg
490 } "1 {channel \"$wfile\" wasn't opened for reading}"
491 test iocmd-15.9 {Tcl_FcopyObjCmd} {
492     list [catch {fcopy $rfile $rfile} msg] $msg
493 } "1 {channel \"$rfile\" wasn't opened for writing}"
494 test iocmd-15.10 {Tcl_FcopyObjCmd} {
495     list [catch {fcopy $rfile $wfile foo bar} msg] $msg
496 } {1 {bad switch "foo": must be -size or -command}}
497 test iocmd-15.11 {Tcl_FcopyObjCmd} {
498     list [catch {fcopy $rfile $wfile -size foo} msg] $msg
499 } {1 {expected integer but got "foo"}}
500 test iocmd-15.12 {Tcl_FcopyObjCmd} {
501     list [catch {fcopy $rfile $wfile -command bar -size foo} msg] $msg
502 } {1 {expected integer but got "foo"}}
503
504 close $rfile
505 close $wfile
506
507 # cleanup
508 foreach file [list test1 test2 test3 test4] {
509     ::tcltest::removeFile $file
510 }
511 # delay long enough for background processes to finish
512 after 500
513 foreach file [list test5 pipe output] {
514     ::tcltest::removeFile $file
515 }
516 ::tcltest::cleanupTests
517 return
518
519
520
521
522
523
524
525
526
527
528
529
530