Index: tests/submethods.test =================================================================== diff -u -ra24e1f836c3126d0a0e9467bde3a9fa8da901711 -ra467cf37f204cc977b7af7519a0994c65f9ed10f --- tests/submethods.test (.../submethods.test) (revision a24e1f836c3126d0a0e9467bde3a9fa8da901711) +++ tests/submethods.test (.../submethods.test) (revision a467cf37f204cc977b7af7519a0994c65f9ed10f) @@ -229,7 +229,7 @@ # defaultcmd has to return also subcmds of other shadowed ensembles ? {lsort [o1 info has]} "Valid submethods of ::o1 info has: mixin namespace something type" - ? {lsort [o1 info]} "Valid submethods of ::o1 info: children class filter has info is lookup method methods mixin parent precedence slots vars" + ? {lsort [o1 info]} "Valid submethods of ::o1 info: children class filter has info is lookup method methods mixin parent precedence slot vars" # returning methodpath in ensemble ? {o1 info has something path} "info has something path" @@ -519,8 +519,22 @@ } +# +# +# +nx::Test case current-args { + nx::Class create C { + :method foo {{-x 1} z:optional} {return [current args]} + :method "bar foo" {{-x 1} z:optional} {return [current args]} + :create c1 + } + ? {c1 foo} "" + ? {c1 bar foo} "" + ? {c1 foo -x 2} "-x 2" + ? {c1 bar foo -x 2} "-x 2" +}