Index: tests/methods.test =================================================================== diff -u -r0585d441caad26de7a81eb2c3c07f00d3f3db256 -re528761906857b0f8307d5bc9b94878168234965 --- tests/methods.test (.../methods.test) (revision 0585d441caad26de7a81eb2c3c07f00d3f3db256) +++ tests/methods.test (.../methods.test) (revision e528761906857b0f8307d5bc9b94878168234965) @@ -645,3 +645,35 @@ ? {C info methods -path} "" } +# +# simple unknown tests; +# ensemble unknown tests are in submethods.test +# +nx::Test case test-simple-unknown { + + # + # calling unknown with a plain "method" without arguments + # + ::nx::Class create A { + :class method unknown args {? [list set _ $args] "hello"} + } + A hello + + # + # calling unknown with a plain "method" with arguments + # + ::nx::Class create B { + :class method unknown args {? [list set _ $args] "hello world"} + } + B hello world + + # + # calling unknown with a method with spaces + # + ::nx::Class create C { + :class method unknown args {? [list set _ $args] "{hello world}"} + } + C {hello world} + + +} \ No newline at end of file