summaryrefslogtreecommitdiffstats
path: root/tests
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
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')
-rw-r--r--tests/case.test4
-rw-r--r--tests/lreplace.test6
-rw-r--r--tests/regexp.test6
-rw-r--r--tests/regexpComp.test4
-rw-r--r--tests/switch.test10
5 files changed, 15 insertions, 15 deletions
diff --git a/tests/case.test b/tests/case.test
index 023fdbb..a9bec93 100644
--- a/tests/case.test
+++ b/tests/case.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: case.test,v 1.7 2006/10/09 19:15:44 msofer Exp $
+# RCS: @(#) $Id: case.test,v 1.8 2008/07/21 22:22:28 nijtmans Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -51,7 +51,7 @@ test case-2.1 {error in executed command} {
"case a in a {error "Just a test"} default {format 1}"}}
test case-2.2 {error: not enough args} {
list [catch {case} msg] $msg
-} {1 {wrong # args: should be "case string ?in? patList body ... ?default body?"}}
+} {1 {wrong # args: should be "case string ?in? ?pattern body ...? ?default body?"}}
test case-2.3 {error: pattern with no body} {
list [catch {case a b} msg] $msg
} {1 {extra case pattern with no body}}
diff --git a/tests/lreplace.test b/tests/lreplace.test
index 6ea1f75..59934fb 100644
--- a/tests/lreplace.test
+++ b/tests/lreplace.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: lreplace.test,v 1.9 2005/05/10 18:35:22 kennykb Exp $
+# RCS: @(#) $Id: lreplace.test,v 1.10 2008/07/21 22:22:28 nijtmans Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -104,10 +104,10 @@ test lreplace-1.26 {lreplace command} {
test lreplace-2.1 {lreplace errors} {
list [catch lreplace msg] $msg
-} {1 {wrong # args: should be "lreplace list first last ?element element ...?"}}
+} {1 {wrong # args: should be "lreplace list first last ?element ...?"}}
test lreplace-2.2 {lreplace errors} {
list [catch {lreplace a b} msg] $msg
-} {1 {wrong # args: should be "lreplace list first last ?element element ...?"}}
+} {1 {wrong # args: should be "lreplace list first last ?element ...?"}}
test lreplace-2.3 {lreplace errors} {
list [catch {lreplace x a 10} msg] $msg
} {1 {bad index "a": must be integer?[+-]integer? or end?[+-]integer?}}
diff --git a/tests/regexp.test b/tests/regexp.test
index b32d027..5b0f886 100644
--- a/tests/regexp.test
+++ b/tests/regexp.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: regexp.test,v 1.31 2008/07/21 21:25:22 nijtmans Exp $
+# RCS: @(#) $Id: regexp.test,v 1.32 2008/07/21 22:22:28 nijtmans Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -194,10 +194,10 @@ test regexp-5.5 {exercise cache of compiled expressions} {
test regexp-6.1 {regexp errors} {
list [catch {regexp a} msg] $msg
-} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}}
+} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar ...?"}}
test regexp-6.2 {regexp errors} {
list [catch {regexp -nocase a} msg] $msg
-} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}}
+} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar ...?"}}
test regexp-6.3 {regexp errors} {
list [catch {regexp -gorp a} msg] $msg
} {1 {bad switch "-gorp": must be -all, -about, -indices, -inline, -expanded, -line, -linestop, -lineanchor, -nocase, -start, or --}}
diff --git a/tests/regexpComp.test b/tests/regexpComp.test
index e9c324f..7feaa5f 100644
--- a/tests/regexpComp.test
+++ b/tests/regexpComp.test
@@ -259,12 +259,12 @@ test regexpComp-6.1 {regexp errors} {
evalInProc {
list [catch {regexp a} msg] $msg
}
-} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}}
+} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar ...?"}}
test regexpComp-6.2 {regexp errors} {
evalInProc {
list [catch {regexp -nocase a} msg] $msg
}
-} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}}
+} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar ...?"}}
test regexpComp-6.3 {regexp errors} {
evalInProc {
list [catch {regexp -gorp a} msg] $msg
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}