jwaldrip/odin — pull request #10 by dcarley (2014-10-17 12:45:02+00:00)
Title: SubCommand inherit ErrorHandling from parent

The default for `ErrorHandling` was changed from `ContinueOnError` to
`PanicOnError` 8c20e9b. However this didn't apply to sub-commands, which
continued to use `ContinueOnError` and would execute the sub-command
function (in addition to printing the usage message) when not passed
mandatory arguments.

Fix this by copying `ErrorHandling` from the parent when adding a new
sub-command. The additional test asserts that the sub-command raises a panic
and doesn't execute it's contents when it doesn't receive the correct number
of arguments. Mute is required to prevent the help message being printed
during the tests.

---

Plus correct the name of the test for `AddSubCommands `.