summaryrefslogtreecommitdiffstats
path: root/tests/ioCmd.test
diff options
context:
space:
mode:
authornijtmans <nijtmans>2011-01-17 11:27:28 (GMT)
committernijtmans <nijtmans>2011-01-17 11:27:28 (GMT)
commit1dd5fbf51a42ff6449ede1d172e8f71952936965 (patch)
treec819a443954da3477561d7d07bc94d54a8dcf4e4 /tests/ioCmd.test
parentf1e18bf51337c961ce3f57362d0fc1a6584af378 (diff)
downloadtcl-1dd5fbf51a42ff6449ede1d172e8f71952936965.zip
tcl-1dd5fbf51a42ff6449ede1d172e8f71952936965.tar.gz
tcl-1dd5fbf51a42ff6449ede1d172e8f71952936965.tar.bz2
[Bug 3148192]: Commands "read/puts" incorrectly interpret parameters.
Improved error-message regarding legacy form.
Diffstat (limited to 'tests/ioCmd.test')
-rw-r--r--tests/ioCmd.test8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 920238c..09360ff 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -13,7 +13,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: ioCmd.test,v 1.53 2010/08/03 20:06:47 dgp Exp $
+# RCS: @(#) $Id: ioCmd.test,v 1.54 2011/01/17 11:27:28 nijtmans Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -35,7 +35,7 @@ test iocmd-1.2 {puts command} {
} {1 {wrong # args: should be "puts ?-nonewline? ?channelId? string"}}
test iocmd-1.3 {puts command} {
list [catch {puts froboz -nonewline kablooie} msg] $msg
-} {1 {bad argument "kablooie": should be "nonewline"}}
+} {1 {wrong # args: should be "puts ?-nonewline? ?channelId? string"}}
test iocmd-1.4 {puts command} {
list [catch {puts froboz hello} msg] $msg
} {1 {can not find channel named "froboz"}}
@@ -138,7 +138,7 @@ test iocmd-4.8 {read command with incorrect combination of arguments} {
} {1 {wrong # args: should be "read channelId ?numChars?" or "read ?-nonewline? channelId"} {TCL WRONGARGS}}
test iocmd-4.9 {read command} {
list [catch {read stdin foo} msg] $msg $::errorCode
-} {1 {bad argument "foo": should be "nonewline"} NONE}
+} {1 {expected non-negative integer but got "foo"} {TCL VALUE NUMBER}}
test iocmd-4.10 {read command} {
list [catch {read file107} msg] $msg $::errorCode
} {1 {can not find channel named "file107"} {TCL LOOKUP CHANNEL file107}}
@@ -156,7 +156,7 @@ test iocmd-4.12 {read command} -setup {
list [catch {read $f 12z} msg] $msg $::errorCode
} -cleanup {
close $f
-} -result {1 {expected integer but got "12z"} {TCL VALUE NUMBER}}
+} -result {1 {expected non-negative integer but got "12z"} {TCL VALUE NUMBER}}
test iocmd-5.1 {seek command} -returnCodes error -body {
seek