Add more smoke test for gclient config and gclient revinfo.
BUG=23328
Review URL: http://codereview.chromium.org/2285003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48311 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient.py b/gclient.py
index 80b524b..926b178 100644
--- a/gclient.py
+++ b/gclient.py
@@ -834,9 +834,10 @@
parser.add_option("--name",
help="overrides the default name for the solution")
(options, args) = parser.parse_args(args)
- if len(args) < 1 and not options.spec:
- raise gclient_utils.Error("required argument missing; see 'gclient help "
- "config'")
+ if ((options.spec and args) or len(args) > 2 or
+ (not options.spec and not args)):
+ parser.error('Inconsistent arguments. Use either --spec or one or 2 args')
+
if os.path.exists(options.config_filename):
raise gclient_utils.Error("%s file already exists in the current directory"
% options.config_filename)