summaryrefslogtreecommitdiffstats
path: root/tests/cmdMZ.test
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2004-07-06 20:17:08 (GMT)
committerKevin B Kenny <kennykb@acm.org>2004-07-06 20:17:08 (GMT)
commitb7a17dd6698402d0a310eea11b8969e79d2f3680 (patch)
tree6e6b24050342ef291bbc5bd410d09a3b7aeaa8be /tests/cmdMZ.test
parent9bab74701d98f139b8d5d9042f5695a6eb5c6c2c (diff)
downloadtcl-b7a17dd6698402d0a310eea11b8969e79d2f3680.zip
tcl-b7a17dd6698402d0a310eea11b8969e79d2f3680.tar.gz
tcl-b7a17dd6698402d0a310eea11b8969e79d2f3680.tar.bz2
* tests/cmdMZ.test (cmdMZ-return-2.15,cmdMZ-return-2.16):
Added a test that a return code containing spaces is correctly returned.
Diffstat (limited to 'tests/cmdMZ.test')
-rw-r--r--tests/cmdMZ.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test
index ae5725b..827c77b 100644
--- a/tests/cmdMZ.test
+++ b/tests/cmdMZ.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: cmdMZ.test,v 1.22 2004/06/23 15:36:55 dkf Exp $
+# RCS: @(#) $Id: cmdMZ.test,v 1.23 2004/07/06 20:17:11 kennykb Exp $
if {[catch {package require tcltest 2.1}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.1 required."
@@ -151,6 +151,27 @@ test cmdMZ-return-2.14 {return option handling} -body {
return -level 0 -code error -options {-code foo -options {-code break}}
} -returnCodes break -result {}
+test cmdMZ-return-2.15 {return opton handling} -setup {
+ proc p {} {
+ return -code error -errorcode {a b} c
+ }
+ } -body {
+ list [catch p result] $result $::errorCode
+ } -cleanup {
+ rename p {}
+ } -result {1 c {a b}}
+
+test cmdMZ-return-2.16 {return opton handling} -setup {
+ proc p {} {
+ return -code error -errorcode [list a b] c
+ }
+ } -body {
+ list [catch p result] $result $::errorCode
+ } -cleanup {
+ rename p {}
+ } -result {1 c {a b}}
+
+
# Check that the result of a [return -options $opts $result] is
# indistinguishable from that of the originally caught script, no
# matter what the script is/does. (TIP 90)