diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2005-06-07 10:04:46 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2005-06-07 10:04:46 (GMT) |
commit | 665306595a3bc3b92d851d4df40e62875e0442e4 (patch) | |
tree | db151d401631884701b22d31740507e5839dbd14 /tests | |
parent | f10e294a14970b83477f6e6d09c48218469aa0a9 (diff) | |
download | tcl-665306595a3bc3b92d851d4df40e62875e0442e4.zip tcl-665306595a3bc3b92d851d4df40e62875e0442e4.tar.gz tcl-665306595a3bc3b92d851d4df40e62875e0442e4.tar.bz2 |
Clean up tests in chan.test and add mechanism for chaining Tcl_WrongNumArgs
messages (used in [read] implementation)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/chan.test | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/chan.test b/tests/chan.test index ae866bd..93cadc9 100644 --- a/tests/chan.test +++ b/tests/chan.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chan.test,v 1.1 2005/06/06 23:45:46 dkf Exp $ +# RCS: @(#) $Id: chan.test,v 1.2 2005/06/07 10:05:01 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -16,10 +16,10 @@ if {[lsearch [namespace children] ::tcltest] == -1} { test chan-1.1 {chan command general syntax} -body { chan -} -returnCodes error -result "wrong # args: should be \"chan subcommand ...\"" +} -returnCodes error -result "wrong # args: should be \"chan subcommand ?argument ...?\"" test chan-1.2 {chan command general syntax} -body { chan FOOBAR -} -returnCodes error -result "unknown or ambiguous command \"FOOBAR\": should be one of blocked, close, configure, copy, eof, event, flush, gets, names, puts, read, seek, tell, and truncate" +} -returnCodes error -result "unknown or ambiguous subcommand \"FOOBAR\": must be blocked, close, configure, copy, eof, event, flush, gets, names, puts, read, seek, tell, or truncate" test chan-2.1 {chan command: blocked subcommand} -body { chan blocked foo bar @@ -30,7 +30,7 @@ test chan-3.1 {chan command: close subcommand} -body { } -returnCodes error -result "wrong # args: should be \"chan close channelId\"" test chan-4.1 {chan command: configure subcommand} -body { - chan blocked + chan configure } -returnCodes error -result "wrong # args: should be \"chan configure channelId ?optionName? ?value? ?optionName value?...\"" test chan-5.1 {chan command: copy subcommand} -body { @@ -43,7 +43,7 @@ test chan-6.1 {chan command: eof subcommand} -body { test chan-7.1 {chan command: event subcommand} -body { chan event foo -} -returnCodes error -result "wrong # args: should be \"chan event channelId mode ?script?\"" +} -returnCodes error -result "wrong # args: should be \"chan event channelId event ?script?\"" test chan-8.1 {chan command: flush subcommand} -body { chan flush foo bar @@ -62,7 +62,7 @@ test chan-11.1 {chan command: puts subcommand} -body { } -returnCodes error -result "wrong # args: should be \"chan puts ?-nonewline? ?channelId? string\"" test chan-12.1 {chan command: read subcommand} -body { - chan read foo bar + chan read } -returnCodes error -result "wrong # args: should be \"chan read channelId ?numChars?\" or \"chan read ?-nonewline? channelId\"" test chan-13.1 {chan command: seek subcommand} -body { |