summaryrefslogtreecommitdiffstats
path: root/tests/ioCmd.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ioCmd.test')
-rw-r--r--tests/ioCmd.test23
1 files changed, 12 insertions, 11 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index fd39263..e8eb96c 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# "@(#) ioCmd.test 1.49 97/10/31 17:23:22"
+# "@(#) ioCmd.test 1.53 98/01/07 16:23:34"
if {[string compare test [info procs test]] == 1} then {source defs}
@@ -158,7 +158,7 @@ test iocmd-5.3 {seek command} {
} {1 {expected integer but got "gugu"}}
test iocmd-5.4 {seek command} {
list [catch {seek stdin 100 gugu} msg] $msg
-} {1 {bad origin "gugu": should be start, current, or end}}
+} {1 {bad origin "gugu": must be start, current, or end}}
test iocmd-6.1 {tell command} {
list [catch {tell} msg] $msg
@@ -205,31 +205,31 @@ test iocmd-8.6 {fconfigure command} {
test iocmd-8.7 {fconfigure command} {
removeFile test1
set f1 [open test1 w]
- fconfigure $f1 -translation lf -eofchar {}
+ fconfigure $f1 -translation lf -eofchar {} -encoding unicode
set x [fconfigure $f1]
close $f1
set x
-} {-blocking 1 -buffering full -buffersize 4096 -eofchar {} -translation lf}
+} {-blocking 1 -buffering full -buffersize 4096 -encoding unicode -eofchar {} -translation lf}
test iocmd-8.8 {fconfigure command} {
removeFile test1
set f1 [open test1 w]
fconfigure $f1 -translation lf -buffering line -buffersize 3030 \
- -eofchar {}
+ -eofchar {} -encoding unicode
set x ""
lappend x [fconfigure $f1 -buffering]
lappend x [fconfigure $f1]
close $f1
set x
-} {line {-blocking 1 -buffering line -buffersize 3030 -eofchar {} -translation lf}}
+} {line {-blocking 1 -buffering line -buffersize 3030 -encoding unicode -eofchar {} -translation lf}}
test iocmd-8.9 {fconfigure command} {
removeFile test1
set f1 [open test1 w]
fconfigure $f1 -translation binary -buffering none -buffersize 4040 \
- -eofchar {}
+ -eofchar {} -encoding binary
set x [fconfigure $f1]
close $f1
set x
-} {-blocking 1 -buffering none -buffersize 4040 -eofchar {} -translation lf}
+} {-blocking 1 -buffering none -buffersize 4040 -encoding binary -eofchar {} -translation lf}
test iocmd-8.10 {fconfigure command} {
list [catch {fconfigure a b} msg] $msg
} {1 {can not find channel named "a"}}
@@ -313,6 +313,8 @@ test iocmd-9.3 {eof command} {
list [catch {eof file100} msg] $msg $errorCode
} {1 {can not find channel named "file100"} NONE}
+# The tests for Tcl_ExecObjCmd are in exec.test
+
test iocmd-10.1 {fblocked command} {
list [catch {fblocked} msg] $msg
} {1 {wrong # args: should be "fblocked channelId"}}
@@ -488,7 +490,7 @@ test iocmd-15.9 {Tcl_FcopyObjCmd} {
} "1 {channel \"$rfile\" wasn't opened for writing}"
test iocmd-15.10 {Tcl_FcopyObjCmd} {
list [catch {fcopy $rfile $wfile foo bar} msg] $msg
-} {1 {bad switch "foo": must be -size, or -command}}
+} {1 {bad switch "foo": must be -size or -command}}
test iocmd-15.11 {Tcl_FcopyObjCmd} {
list [catch {fcopy $rfile $wfile -size foo} msg] $msg
} {1 {expected integer but got "foo"}}
@@ -508,5 +510,4 @@ after 500
removeFile test5
removeFile pipe
removeFile output
-set x ""
-set x
+return