summaryrefslogtreecommitdiffstats
path: root/tests/switch.test
diff options
context:
space:
mode:
authornijtmans <nijtmans@noemail.net>2008-07-21 22:22:27 (GMT)
committernijtmans <nijtmans@noemail.net>2008-07-21 22:22:27 (GMT)
commit3035d6701aed34b15f255d3ad99fddc8678f8c94 (patch)
tree939859d1daf31c3aa07ae3bd9ef742426f0aa190 /tests/switch.test
parent560ab83c575aad043c8a07e6ce4c44455a019dde (diff)
downloadtcl-3035d6701aed34b15f255d3ad99fddc8678f8c94.zip
tcl-3035d6701aed34b15f255d3ad99fddc8678f8c94.tar.gz
tcl-3035d6701aed34b15f255d3ad99fddc8678f8c94.tar.bz2
fix [2021443] inconsistant "wrong # args" messages (follow-up)
FossilOrigin-Name: cfc8157c41627729e35e1d1f472ff1756fcddd5b
Diffstat (limited to 'tests/switch.test')
-rw-r--r--tests/switch.test10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/switch.test b/tests/switch.test
index 5164ca4..db346e9 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.22 2008/07/21 21:25:22 nijtmans Exp $
+# RCS: @(#) $Id: switch.test,v 1.23 2008/07/21 22:22:28 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 ?-switch ...? string pattern body ?pattern body ...? ?default body?"}
+} -result {wrong # args: should be "switch ?-switch ...? string ?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 ?-switch ...? string pattern body ?pattern body ...? ?default body?"}
+} -result {wrong # args: should be "switch ?-switch ...? string ?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 ?-switch ...? string {pattern body ?pattern body ...? ?default body?}"}
+} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {?pattern body ...? ?default body?}"}
test switch-9.4 {empty pattern/body list} -body {
switch -- x {}
-} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {pattern body ?pattern body ...? ?default body?}"}
+} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {?pattern body ...? ?default body?}"}
test switch-9.5 {unpaired pattern} -body {
switch x a {} b
} -returnCodes error -result {extra switch pattern with no body}