diff options
author | andreas_kupries <akupries@shaw.ca> | 2004-04-23 23:38:40 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2004-04-23 23:38:40 (GMT) |
commit | 50d6201cac70a27a95e96cb3ceb1380716b58df1 (patch) | |
tree | 5b86fa67d119f5917e6e42389b7bcc8bbbdc9368 /tests/io.test | |
parent | 08d392e408619e7cbb5e873334e66cb113eecff9 (diff) | |
download | tcl-50d6201cac70a27a95e96cb3ceb1380716b58df1.zip tcl-50d6201cac70a27a95e96cb3ceb1380716b58df1.tar.gz tcl-50d6201cac70a27a95e96cb3ceb1380716b58df1.tar.bz2 |
* generic/tclIO.c (Tcl_SetChannelOption): Fixed [SF Tcl Bug
930851]. When changing the eofchar we have to zap the related
flags to prevent them from prematurely aborting the next read.
Diffstat (limited to 'tests/io.test')
-rw-r--r-- | tests/io.test | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/io.test b/tests/io.test index c64298e..e3babf6 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.50 2004/03/17 18:14:17 das Exp $ +# RCS: @(#) $Id: io.test,v 1.51 2004/04/23 23:38:42 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -7098,7 +7098,22 @@ 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} { + set f [open $datafile r] + fconfigure $f -eofchar = + lappend res [read $f; tell $f] + fconfigure $f -eofchar {} + lappend res [read $f 1] + lappend res [read $f; tell $f] + # Any seek zaps the internals into a good state. + #seek $f 0 start + #seek $f 0 current + #lappend res [read $f; tell $f] + close $f + set res +} {77 = 23431} # cleanup |