Index: TODO =================================================================== diff -u -r61d81f3da45ce76f6bb9eafa4cc8a1b4c5b08953 -r56f4f317c47da838e5ba90bba28d0c14b11f2392 --- TODO (.../TODO) (revision 61d81f3da45ce76f6bb9eafa4cc8a1b4c5b08953) +++ TODO (.../TODO) (revision 56f4f317c47da838e5ba90bba28d0c14b11f2392) @@ -5498,6 +5498,11 @@ - provide error messages for ambiguous abbreviations - extend regression test (now 5460 tests) +nsf.c: +- see no need, why we should "set nodashalnum for int types" +- extended regression test + + ======================================================================== TODO: @@ -5506,19 +5511,16 @@ and not about "mixin". The message for "C info mixin classes" is fine -- finish pluaral reform +- finish plural reform - update migration guide and tutorial - maybe introdouce "allowabbrev" flag -- set nodashalnum for int types - should we change "/obj/ info lookup syntax /methodName/" to return obj and method as well? (similar to "info method syntax /methodName/") - we could drop methods::object::info::objectparameter - remove // comments -- what should happen with: "/class/ info mixin classes -heritage" - - check deactivated tests in tests/serialize.test C(One), C(IgnoreAll), C(None2) and xlloc fix Index: tests/method-parameter.test =================================================================== diff -u -r61d81f3da45ce76f6bb9eafa4cc8a1b4c5b08953 -r56f4f317c47da838e5ba90bba28d0c14b11f2392 --- tests/method-parameter.test (.../method-parameter.test) (revision 61d81f3da45ce76f6bb9eafa4cc8a1b4c5b08953) +++ tests/method-parameter.test (.../method-parameter.test) (revision 56f4f317c47da838e5ba90bba28d0c14b11f2392) @@ -10,7 +10,7 @@ nsf::proc p1 {-x} {return [list [info exists x]]} ? {p0} 1 - ;# the following error msg comes from Tcl + # the following error msg comes from Tcl ? {p0 -x} {wrong # args: should be "p0"} ? {p1} 0 @@ -63,7 +63,7 @@ ? {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/?"} } # @@ -94,7 +94,7 @@ C public method p1 {-y} {return [list [info exists y]]} return "" } - + ? {c1 p1 -x 1 -y} {invalid non-positional argument '-y', valid are : -x; should be "::c1 p1 ?-x /value/?"} } @@ -355,10 +355,14 @@ ? {-b info superclasses -- -a} "::-a" } +# +# Test abbreviations +# + nx::test case abbrevs { - nsf::proc x {-super -super11 -superclass -super12} { - return [info exists super]-[info exists super11]-[info exists superclass]-[info exists super12] + nsf::proc x {-super -super11 -superclass -super12} { + return [info exists super]-[info exists super11]-[info exists superclass]-[info exists super12] } ? {x -super 1} "1-0-0-0" ? {x -super1 1} "the provided argument -super1 is an abbreviation for -super11 and -super12" @@ -375,6 +379,27 @@ } # +# leading dash and and numbers +# + +nx::test case abbrevs { + + nsf::proc x {-x y:integer} { + return [info exists x]-$y + } + ? {x 1} "0-1" + ? {x -1} "0--1" + ? {x -- -1} "0--1" + + nsf::proc y {-1 y:integer} { + return [info exists 1]-$y + } + ? {y 1} "0-1" + ? {y -1} "value for parameter '-1' expected" + ? {y -- -1} "0--1" +} + +# # Local variables: # mode: tcl # tcl-indent-level: 2