Add tests to validate command structures.
Merge pull request #1197 from smblott-github/command-option-tests

Add tests to validate command structures.