summaryrefslogtreecommitdiffstats
path: root/tests/io.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-07-23 15:58:40 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-07-23 15:58:40 (GMT)
commitce80f287e3856b96b77ca1552be124f733dfa434 (patch)
tree9ee0ef4b5c6501237d3e392ed957009b4e1fef20 /tests/io.test
parent2d256ff29b229418066214a286c915e1b4b9bdd5 (diff)
downloadtcl-ce80f287e3856b96b77ca1552be124f733dfa434.zip
tcl-ce80f287e3856b96b77ca1552be124f733dfa434.tar.gz
tcl-ce80f287e3856b96b77ca1552be124f733dfa434.tar.bz2
* tests/eofchar.data (removed): Test io-61.1 now generates its own
* tests/io.test: file of test data as needed.
Diffstat (limited to 'tests/io.test')
-rw-r--r--tests/io.test19
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/io.test b/tests/io.test
index d9e9b60..bcf17bb 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.58 2004/07/02 18:36:56 kennykb Exp $
+# RCS: @(#) $Id: io.test,v 1.59 2004/07/23 15:58:40 dgp Exp $
if {[catch {package require tcltest 2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2 required."
@@ -7099,9 +7099,15 @@ test io-60.1 {writing illegal utf sequences} {openpipe fileevent} {
list $x $result
} {1 {gets {} catch {error writing "stdout": invalid argument}}}
-set datafile [file join $::tcltest::testsDirectory eofchar.data]
-
-test io-61.1 {Reset eof state after changing the eof char} {
+test io-61.1 {Reset eof state after changing the eof char} -setup {
+ set datafile [makeFile {} eofchar]
+ set f [open $datafile w]
+ puts -nonewline $f [string repeat "Ho hum\n" 11]
+ puts $f =
+ set line [string repeat "Ge gla " 4]
+ puts -nonewline $f [string repeat [string trimright $line]\n 834]
+ close $f
+} -body {
set f [open $datafile r]
fconfigure $f -eofchar =
set res {}
@@ -7115,8 +7121,9 @@ test io-61.1 {Reset eof state after changing the eof char} {
#lappend res [read $f; tell $f]
close $f
set res
-} {77 = 23431}
-
+} -cleanup {
+ removeFile eofchar
+} -result {77 = 23431}
# cleanup
foreach file [list fooBar longfile script output test1 pipe my_script foo \