summaryrefslogtreecommitdiffstats
path: root/tests/io.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/io.test')
-rw-r--r--tests/io.test19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/io.test b/tests/io.test
index 8ce7f4e..59d6b72 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.40.2.3 2004/02/25 23:38:16 dgp Exp $
+# RCS: @(#) $Id: io.test,v 1.40.2.4 2004/04/23 23:40:59 andreas_kupries Exp $
if {[catch {package require tcltest 2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2 required."
@@ -7109,6 +7109,23 @@ test io-60.1 {writing illegal utf sequences} {openpipe fileevent} {
} {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