summaryrefslogtreecommitdiffstats
path: root/tests/switch.test
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-07-21 22:22:27 (GMT)
committernijtmans <nijtmans>2008-07-21 22:22:27 (GMT)
commit57bdff7e68cb1e0fe66a2671b18ce67ecbb79e69 (patch)
tree939859d1daf31c3aa07ae3bd9ef742426f0aa190 /tests/switch.test
parentee89317ed438f41a8fa968d3a117332e96b7f155 (diff)
downloadtcl-57bdff7e68cb1e0fe66a2671b18ce67ecbb79e69.zip
tcl-57bdff7e68cb1e0fe66a2671b18ce67ecbb79e69.tar.gz
tcl-57bdff7e68cb1e0fe66a2671b18ce67ecbb79e69.tar.bz2
fix [2021443] inconsistant "wrong # args" messages (follow-up)
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}