Fix tests for detecting subcommands