[thin_delta] Print usage on unrecognised switch

This commit is contained in:
Joe Thornber 2014-06-09 10:51:10 +01:00
parent 83f2cce597
commit b03fa373a1
2 changed files with 8 additions and 0 deletions

View File

@ -27,3 +27,7 @@ Feature: thin_delta
{-h|--help}
{-V|--version}
"""
Scenario: Unrecognised option should cause failure
When I run `thin_delta --unleash-the-hedeghogs`
Then it should fail

View File

@ -37,6 +37,10 @@ int main(int argc, char **argv)
case 'V':
cout << THIN_PROVISIONING_TOOLS_VERSION << endl;
return 0;
default:
usage(cerr, basename(argv[0]));
return 1;
}
}