Index: tests/method-parameter.test =================================================================== diff -u -N -rdadc7c6c6858ff3b816ff4cc585e0d76684ec374 -r35c0d6ecb3c83cc6d6b0dfe251ba1a0d9071dc30 --- tests/method-parameter.test (.../method-parameter.test) (revision dadc7c6c6858ff3b816ff4cc585e0d76684ec374) +++ tests/method-parameter.test (.../method-parameter.test) (revision 35c0d6ecb3c83cc6d6b0dfe251ba1a0d9071dc30) @@ -13,17 +13,17 @@ ? {p1} 0 ? {p1 -x} {value for parameter '-x' expected} ? {p1 -x 1} 1 - ? {p1 -x 1 2} {invalid argument '2', maybe too many arguments; should be "p1 ?-x value?"} + ? {p1 -x 1 2} {invalid argument '2', maybe too many arguments; should be "p1 ?-x /value/?"} ? {p1 -x 1 -y} {invalid non-positional argument '-y', valid are : -x; - should be "p1 ?-x value?"} - ? {p1 a} {invalid argument 'a', maybe too many arguments; should be "p1 ?-x value?"} - ? {p1 a -x} {invalid argument 'a', maybe too many arguments; should be "p1 ?-x value?"} + should be "p1 ?-x /value/?"} + ? {p1 a} {invalid argument 'a', maybe too many arguments; should be "p1 ?-x /value/?"} + ? {p1 a -x} {invalid argument 'a', maybe too many arguments; should be "p1 ?-x /value/?"} ? {p1 --} 0 ? {p1 -y} {invalid non-positional argument '-y', valid are : -x; - should be "p1 ?-x value?"} + should be "p1 ?-x /value/?"} ? {p1 -y --} {invalid non-positional argument '-y', valid are : -x; - should be "p1 ?-x value?"} + should be "p1 ?-x /value/?"} # # should we really allow numeric nonpos arg names? @@ -50,15 +50,15 @@ ? {p2a -x 1 -y} {1 -y} ? {p2b -x 1 -y} {invalid non-positional argument '-y', valid are : -x; - should be "p2b ?-x value? ?arg ...?"} + should be "p2b ?-x /value/? ?/arg .../?"} ? {p2c -x 1 -y} {invalid non-positional argument '-y', valid are : -x; - should be "p2c ?-x value? ?arg ...?"} + should be "p2c ?-x /value/? ?/arg .../?"} nsf::proc p3a {a -x -y b:noleadingdash -z} {return [list $a [info exists x] [info exists y] $b]} ? {p3a 100 -x 1 -y 1 200} {100 1 1 200} ? {p3a 100 -xx 1 -y 1 200} {invalid non-positional argument '-xx', valid are : -x, -y; - should be "p3a /a/ ?-x value? ?-y value? /b/ ?-z value?"} + should be "p3a /a/ ?-x /value/? ?-y /value/? /b/ ?-z /value/?"} } nx::Test case unknown-handler { @@ -68,15 +68,15 @@ :create c1 } ? {c1 p1 -x 1 -y} {invalid non-positional argument '-y', valid are : -x; - should be "::c1 p1 ?-x value?"} + should be "::c1 p1 ?-x /value/?"} proc ::nsf::argument::unknown {method arg args} { puts stderr "??? unknown nonpos-arg $arg in $method obj <$args>\n[info frame -1]\n" return "" } ? {c1 p1 -x 1 -y} {invalid non-positional argument '-y', valid are : -x; - should be "::c1 p1 ?-x value?"} + should be "::c1 p1 ?-x /value/?"} if {0} { proc ::nsf::argument::unknown {method arg args} { @@ -87,6 +87,6 @@ } ? {c1 p1 -x 1 -y} {invalid non-positional argument '-y', valid are : -x; - should be "::c1 p1 ?-x value?"} + should be "::c1 p1 ?-x /value/?"} } }