2017-08-04 12:01:16 -07:00
|
|
|
|
|
|
|
####################
|
|
|
|
# No args is an error
|
|
|
|
|
|
|
|
####################
|
|
|
|
# No short flag or an invalid short flag is an error
|
|
|
|
|
|
|
|
####################
|
|
|
|
# A required and optional arg makes no sense
|
|
|
|
|
|
|
|
####################
|
|
|
|
# A repeated and optional arg makes no sense
|
|
|
|
|
|
|
|
####################
|
|
|
|
# An unexpected arg not associated with a flag is an error
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Bool, short only
|
2017-07-09 20:03:26 -07:00
|
|
|
h
|
2017-08-04 12:01:16 -07:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Bool, short and long
|
2017-07-09 20:03:26 -07:00
|
|
|
h/help
|
2017-08-04 12:01:16 -07:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Bool, short and long but the short var cannot be used
|
2017-07-09 20:03:26 -07:00
|
|
|
h-help
|
2017-08-04 12:01:16 -07:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Required val, short and long but the short var cannot be used
|
2017-07-09 20:03:26 -07:00
|
|
|
h-help=
|
2017-08-04 12:01:16 -07:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Optional val, short and long valid
|
2017-07-09 20:03:26 -07:00
|
|
|
h/help=?
|
2017-08-04 12:01:16 -07:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Optional val, short and long but the short var cannot be used
|
2017-07-09 20:03:26 -07:00
|
|
|
h-help=?
|
2017-08-04 12:01:16 -07:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Repeated val, short and long valid
|
2017-07-09 20:03:26 -07:00
|
|
|
h/help=+
|
2017-08-04 12:01:16 -07:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Repeated val, short and long but short not valid
|
2017-07-09 20:03:26 -07:00
|
|
|
h-help=+
|
2017-08-04 12:01:16 -07:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Repeated val, short only
|
2017-07-09 20:03:26 -07:00
|
|
|
h=+
|
|
|
|
h=+
|