summaryrefslogtreecommitdiffstats
path: root/tests/proc-old.test
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-03-31 10:29:22 (GMT)
committernijtmans <nijtmans>2010-03-31 10:29:22 (GMT)
commitd939798dd89166dee8a80e460ca723c718099d64 (patch)
tree719850c45bbc1260d42e83ecaf7cba1cb5eedc1c /tests/proc-old.test
parentbab53b84ede66f9acc9a284a16008e39f100f1ca (diff)
downloadtcl-d939798dd89166dee8a80e460ca723c718099d64.zip
tcl-d939798dd89166dee8a80e460ca723c718099d64.tar.gz
tcl-d939798dd89166dee8a80e460ca723c718099d64.tar.bz2
[FRQ 2974744]: share exception codes (ObjType?):
Revised test cases, making sure that abbreviated codes are checked resulting in an error, and checking for the exact error message.
Diffstat (limited to 'tests/proc-old.test')
-rw-r--r--tests/proc-old.test14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/proc-old.test b/tests/proc-old.test
index 29a0607..6a95528 100644
--- a/tests/proc-old.test
+++ b/tests/proc-old.test
@@ -14,7 +14,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: proc-old.test,v 1.17 2008/09/25 19:26:39 dgp Exp $
+# RCS: @(#) $Id: proc-old.test,v 1.18 2010/03/31 10:29:22 nijtmans Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -408,12 +408,12 @@ test proc-old-7.5 {return with special completion code} {
test proc-old-7.6 {return with special completion code} {
list [catch {tproc -14} msg] $msg
} {-14 abc}
-test proc-old-7.7 {return with special completion code} {
- list [catch {tproc gorp} msg] $msg
-} {1 {bad completion code "gorp": must be ok, error, return, break, continue, or an integer}}
-test proc-old-7.8 {return with special completion code} {
- list [catch {tproc 10b} msg] $msg
-} {1 {bad completion code "10b": must be ok, error, return, break, continue, or an integer}}
+test proc-old-7.7 {return with special completion code} -body {
+ tproc err
+} -returnCodes error -match glob -result {bad completion code "err": must be ok, error, return, break, continue*, or an integer}
+test proc-old-7.8 {return with special completion code} -body {
+ tproc 10b
+} -returnCodes error -match glob -result {bad completion code "10b": must be ok, error, return, break, continue*, or an integer}
test proc-old-7.9 {return with special completion code} {
proc tproc2 {} {
tproc return