diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-08-15 17:43:57 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-08-15 17:43:57 (GMT) |
commit | fb1aceab5c31ee41c19858ec794edca1b87341d5 (patch) | |
tree | 357eada5f16be2369d08277457a2d80e3f56758b /tests/ioUtil.test | |
parent | d320d81dec73fb4809b297d876646aeec43be25e (diff) | |
download | tcl-fb1aceab5c31ee41c19858ec794edca1b87341d5.zip tcl-fb1aceab5c31ee41c19858ec794edca1b87341d5.tar.gz tcl-fb1aceab5c31ee41c19858ec794edca1b87341d5.tar.bz2 |
Fix [Bug 1773127]
Diffstat (limited to 'tests/ioUtil.test')
-rw-r--r-- | tests/ioUtil.test | 23 |
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 |