summaryrefslogtreecommitdiffstats
path: root/tests/ioUtil.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ioUtil.test')
-rw-r--r--tests/ioUtil.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/ioUtil.test b/tests/ioUtil.test
index c2894ce..8165a2e 100644
--- a/tests/ioUtil.test
+++ b/tests/ioUtil.test
@@ -8,7 +8,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: ioUtil.test,v 1.17 2006/11/03 00:34:53 hobbs Exp $
+# RCS: @(#) $Id: ioUtil.test,v 1.18 2007/08/15 17:43:59 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -301,6 +301,27 @@ test ioUtil-3.8 {TclOpenFileChannelDeleteProc: Verify that all procs have been d
list $err9 $err10 $err11
} {{"TestOpenFileChannelProc1": could not be deleteed} {"TestOpenFileChannelProc2": could not be deleteed} {"TestOpenFileChannelProc3": could not be deleteed}}
+test ioUtil-4.1 {open ... a+ must not use O_APPEND: Bug 1773127} -setup {
+ set f [tcltest::makeFile {} ioutil41.tmp]
+ set fid [open $f wb]
+ puts -nonewline $fid 123
+ close $fid
+} -body {
+ 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 rb]
+ append d [read $fid]
+ close $fid
+ return $d
+} -cleanup {
+ tcltest::removeFile $f
+} -result 341234x6
+
cd $oldpwd
# cleanup