diff options
author | nijtmans <nijtmans> | 2008-07-21 21:25:21 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2008-07-21 21:25:21 (GMT) |
commit | 35f986c4f26a93c0b5a0f91c81deaea2a1e5f30f (patch) | |
tree | 1e36dc0aa27335f1696429c74cc680263b1c9a06 /tests/switch.test | |
parent | ca32e49e84dd1c4b6f27fac6eb8a747cd699d864 (diff) | |
download | tcl-35f986c4f26a93c0b5a0f91c81deaea2a1e5f30f.zip tcl-35f986c4f26a93c0b5a0f91c81deaea2a1e5f30f.tar.gz tcl-35f986c4f26a93c0b5a0f91c81deaea2a1e5f30f.tar.bz2 |
fix [2021443] inconsistant "wrong # args" messages (follow-up)
Diffstat (limited to 'tests/switch.test')
-rw-r--r-- | tests/switch.test | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/switch.test b/tests/switch.test index 9a46191..5164ca4 100644 --- a/tests/switch.test +++ b/tests/switch.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. # -# RCS: @(#) $Id: switch.test,v 1.21 2008/03/21 19:09:13 dkf Exp $ +# RCS: @(#) $Id: switch.test,v 1.22 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -171,7 +171,7 @@ test switch-4.1 {error in executed command} { "switch a a {error "Just a test"} default {subst 1}"}} test switch-4.2 {error: not enough args} -returnCodes error -body { switch -} -result {wrong # args: should be "switch ?switches? string pattern body ... ?default body?"} +} -result {wrong # args: should be "switch ?-switch ...? string pattern body ?pattern body ...? ?default body?"} test switch-4.3 {error: pattern with no body} -body { switch a b } -returnCodes error -result {extra switch pattern with no body} @@ -271,16 +271,16 @@ test switch-8.3 {weird body text, variable} { test switch-9.1 {empty pattern/body list} -returnCodes error -body { switch x -} -result {wrong # args: should be "switch ?switches? string pattern body ... ?default body?"} +} -result {wrong # args: should be "switch ?-switch ...? string pattern body ?pattern body ...? ?default body?"} test switch-9.2 {unpaired pattern} -returnCodes error -body { switch -- x } -result {extra switch pattern with no body} test switch-9.3 {empty pattern/body list} -body { switch x {} -} -returnCodes error -result {wrong # args: should be "switch ?switches? string {pattern body ... ?default body?}"} +} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {pattern body ?pattern body ...? ?default body?}"} test switch-9.4 {empty pattern/body list} -body { switch -- x {} -} -returnCodes error -result {wrong # args: should be "switch ?switches? string {pattern body ... ?default body?}"} +} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {pattern body ?pattern body ...? ?default body?}"} test switch-9.5 {unpaired pattern} -body { switch x a {} b } -returnCodes error -result {extra switch pattern with no body} |