summaryrefslogtreecommitdiffstats
path: root/tests/ioUtil.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ioUtil.test')
-rw-r--r--tests/ioUtil.test34
1 files changed, 18 insertions, 16 deletions
diff --git a/tests/ioUtil.test b/tests/ioUtil.test
index efdaef0..7e8687e 100644
--- a/tests/ioUtil.test
+++ b/tests/ioUtil.test
@@ -1,24 +1,22 @@
# This file (ioUtil.test) tests the hookable TclStat(), TclAccess(),
# and Tcl_OpenFileChannel, routines in the file generic/tclIOUtils.c.
# Sourcing this file into Tcl runs the tests and generates output for
-# errors. No output means no errors were found.
-#
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
+# errors. No output means no errors were found.
+#
+# Copyright (c) 1998-1999 by Scriptics Corporation.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
namespace import -force ::tcltest::*
}
-::tcltest::testConstraint testopenfilechannelproc \
+testConstraint testopenfilechannelproc \
[llength [info commands testopenfilechannelproc]]
-::tcltest::testConstraint testaccessproc \
- [llength [info commands testaccessproc]]
-::tcltest::testConstraint teststatproc \
- [llength [info commands teststatproc]]
+testConstraint testaccessproc [llength [info commands testaccessproc]]
+testConstraint teststatproc [llength [info commands teststatproc]]
set unsetScript {
catch {unset testStat1(size)}
@@ -189,7 +187,7 @@ set oldpwd [pwd]
cd [temporaryDirectory]
test ioUtil-3.1 {TclOpenFileChannel: Check that none of the test procs are there.} {testopenfilechannelproc} {
- catch {eval [list file delete -force] [glob *testOpenFileChannel*]}
+ catch {file delete -force {*}[glob *testOpenFileChannel*]}
catch {file exists testOpenFileChannel1%.fil} err1
catch {file exists testOpenFileChannel2%.fil} err2
catch {file exists testOpenFileChannel3%.fil} err3
@@ -303,18 +301,18 @@ test ioUtil-3.8 {TclOpenFileChannelDeleteProc: Verify that all procs have been d
test ioUtil-4.1 {open ... a+ must not use O_APPEND: Bug 1773127} -setup {
set f [tcltest::makeFile {} ioutil41.tmp]
- set fid [open $f w]
+ set fid [open $f wb]
puts -nonewline $fid 123
close $fid
} -body {
- set fid [open $f a+]
+ set fid [open $f ab+]
puts -nonewline $fid 456
seek $fid 2
set d [read $fid 2]
seek $fid 4
puts -nonewline $fid x
close $fid
- set fid [open $f r]
+ set fid [open $f rb]
append d [read $fid]
close $fid
return $d
@@ -327,3 +325,7 @@ cd $oldpwd
# cleanup
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# End: