Index: xotcl/tests/testx.xotcl =================================================================== diff -u -rfda7a40548bb07598ac92453064c2d844d6b12da -r3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123 --- xotcl/tests/testx.xotcl (.../testx.xotcl) (revision fda7a40548bb07598ac92453064c2d844d6b12da) +++ xotcl/tests/testx.xotcl (.../testx.xotcl) (revision 3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123) @@ -1,4 +1,4 @@ -#$Id: testx.xotcl,v 1.20 2004/11/19 01:41:32 neumann Exp $ +#$Id: testx.xotcl,v 1.21 2004/11/19 22:59:37 neumann Exp $ package require XOTcl namespace import -force xotcl::* @@ -3565,7 +3565,27 @@ a: ack b: banana c: apple] \ "non pos + default values 6" - return "PASSED [self]" + Object o + o proc foo {{-foo 1}} {} { + #puts "foo: $foo" + } + o foo + o foo -foo 0 + catch {o foo -foo} msg + errorCheck $msg "Non positional arg '-foo': value missing" "Empty non-pos arg" + + Object oa + oa proc foo {{-a A}} {b} { + #puts "$a $b" + } + oa foo "B" + oa foo "-" + oa foo "---" + catch {oa foo "--"} msg + + errorCheck $msg "wrong # args: should be {b}" "Non-pos arg: double dash alone" + + return "PASSED [self]" }