summaryrefslogtreecommitdiffstats
path: root/tests/io.test
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2002-07-01 02:29:20 (GMT)
committerdgp <dgp@noemail.net>2002-07-01 02:29:20 (GMT)
commitbc8ac3b1967cd5b2af0fa99ff69af59313ac3805 (patch)
tree4013ba176f77d97263c96b559735522ac72cf6c3 /tests/io.test
parent22d29a32c5741987ebe91adeb78e0a353556aa9c (diff)
downloadtcl-bc8ac3b1967cd5b2af0fa99ff69af59313ac3805.zip
tcl-bc8ac3b1967cd5b2af0fa99ff69af59313ac3805.tar.gz
tcl-bc8ac3b1967cd5b2af0fa99ff69af59313ac3805.tar.bz2
* Fixed [makeFile] and [viewFile] to accurately reflect a file's
contents. Updated tests that depended on buggy behavior. Also added warning messages to "-debug 1" operations to debug test calls to (make|remove)(File|Directory). FossilOrigin-Name: 49cd7e20344769ecfc0827fba55b2ec1a3fd2db5
Diffstat (limited to 'tests/io.test')
-rw-r--r--tests/io.test18
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/io.test b/tests/io.test
index 067db18..973fd4e 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -12,10 +12,10 @@
# 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.31 2002/06/06 18:44:43 dgp Exp $
+# RCS: @(#) $Id: io.test,v 1.32 2002/07/01 02:29:22 dgp Exp $
-if {[catch {package require tcltest 2}]} {
- puts stderr "Skipping tests in [info script]. tcltest 2 required."
+if {[catch {package require tcltest 2.1}]} {
+ puts stderr "Skipping tests in [info script]. tcltest 2.1 required."
return
}
namespace eval ::tcl::test::io {
@@ -4207,7 +4207,8 @@ test io-34.10 {Tcl_Seek testing flushing of buffered input} {
close $f
list $x [viewFile test3]
} "xyz {xyz
-456}"
+456
+}"
test io-34.11 {Tcl_Seek testing flushing of buffered output} {
set f [open test3 w]
puts $f xyz\n123
@@ -4218,7 +4219,8 @@ test io-34.11 {Tcl_Seek testing flushing of buffered output} {
set x [gets $f]
close $f
list $x [viewFile test3]
-} "zzy xyzzy"
+} "zzy {xyzzy
+}"
test io-34.12 {Tcl_Seek testing combination of write, seek back and read} {
set f [open test3 w]
fconfigure $f -translation lf -eofchar {}
@@ -4235,7 +4237,8 @@ test io-34.12 {Tcl_Seek testing combination of write, seek back and read} {
list $x [viewFile test3] $y
} {14 {xyz
123
-xyzzy} zzy}
+xyzzy
+} zzy}
test io-34.13 {Tcl_Tell at start of file} {
removeFile test1
set f1 [open test1 w]
@@ -5208,7 +5211,8 @@ test io-40.7 {POSIX open access modes: EXCL} {
puts $f "A test line"
close $f
viewFile test3
-} {A test line}
+} {A test line
+}
test io-40.8 {POSIX open access modes: TRUNC} {
removeFile test3
set f [open test3 w]