summaryrefslogtreecommitdiffstats
path: root/tests/io.test
diff options
context:
space:
mode:
authorandreas_kupries <andreas_kupries@noemail.net>2004-04-23 23:38:39 (GMT)
committerandreas_kupries <andreas_kupries@noemail.net>2004-04-23 23:38:39 (GMT)
commit32b52d5971b35b317d0d36f599421f5d74768e93 (patch)
tree5b86fa67d119f5917e6e42389b7bcc8bbbdc9368 /tests/io.test
parent38396c26bb735e39e95d5c54a0a3c0032f9485cf (diff)
downloadtcl-32b52d5971b35b317d0d36f599421f5d74768e93.zip
tcl-32b52d5971b35b317d0d36f599421f5d74768e93.tar.gz
tcl-32b52d5971b35b317d0d36f599421f5d74768e93.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. FossilOrigin-Name: 81e0f61614699c9710787c802d9744743a19d2e4
Diffstat (limited to 'tests/io.test')
-rw-r--r--tests/io.test17
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