2015-08-31 03:26:17 +00:00
|
|
|
name: claptests
|
2016-08-28 03:42:31 +00:00
|
|
|
version: "1.0"
|
2015-08-31 03:26:17 +00:00
|
|
|
about: tests clap library
|
|
|
|
author: Kevin K. <kbknapp@gmail.com>
|
2015-10-01 01:45:35 +00:00
|
|
|
settings:
|
2015-09-01 03:50:17 +00:00
|
|
|
- ArgRequiredElseHelp
|
2015-08-31 03:26:17 +00:00
|
|
|
args:
|
|
|
|
- opt:
|
|
|
|
short: o
|
|
|
|
long: option
|
|
|
|
multiple: true
|
|
|
|
help: tests options
|
|
|
|
- positional:
|
|
|
|
help: tests positionals
|
2015-09-01 03:15:08 +00:00
|
|
|
index: 1
|
2015-08-31 03:26:17 +00:00
|
|
|
- positional2:
|
|
|
|
help: tests positionals with exclusions
|
2015-09-01 03:15:08 +00:00
|
|
|
index: 2
|
2016-12-29 04:18:07 +00:00
|
|
|
default_value_if:
|
|
|
|
- [flag, Null, some]
|
|
|
|
- [postional, other, something]
|
2015-08-31 03:26:17 +00:00
|
|
|
- flag:
|
|
|
|
short: f
|
|
|
|
long: flag
|
|
|
|
multiple: true
|
|
|
|
help: tests flags
|
|
|
|
global: true
|
|
|
|
- flag2:
|
|
|
|
short: F
|
|
|
|
help: tests flags with exclusions
|
|
|
|
conflicts_with:
|
|
|
|
- flag
|
|
|
|
requires:
|
|
|
|
- option2
|
|
|
|
- option2:
|
|
|
|
long: long-option-2
|
|
|
|
help: tests long options with exclusions
|
2015-10-01 01:45:35 +00:00
|
|
|
conflicts_with:
|
2015-08-31 03:26:17 +00:00
|
|
|
- option
|
2015-10-01 01:45:35 +00:00
|
|
|
requires:
|
2015-08-31 03:26:17 +00:00
|
|
|
- positional2
|
|
|
|
- option3:
|
|
|
|
short: O
|
|
|
|
long: Option
|
|
|
|
help: tests options with specific value sets
|
|
|
|
takes_value: true
|
|
|
|
possible_values:
|
|
|
|
- fast
|
|
|
|
- slow
|
2016-12-29 04:18:07 +00:00
|
|
|
requires_if:
|
|
|
|
- [fast, flag]
|
2015-08-31 03:26:17 +00:00
|
|
|
- positional3:
|
2015-09-01 03:15:08 +00:00
|
|
|
index: 3
|
2015-08-31 03:26:17 +00:00
|
|
|
help: tests positionals with specific values
|
|
|
|
possible_values: [ vi, emacs ]
|
|
|
|
- multvals:
|
|
|
|
long: multvals
|
|
|
|
help: Tests mutliple values, not mult occs
|
|
|
|
value_names:
|
|
|
|
- one
|
|
|
|
- two
|
|
|
|
- multvalsmo:
|
|
|
|
long: multvalsmo
|
|
|
|
multiple: true
|
|
|
|
help: Tests mutliple values, not mult occs
|
|
|
|
value_names: [one, two]
|
2016-09-06 16:30:31 +00:00
|
|
|
- multvalsdelim:
|
|
|
|
long: multvalsdelim
|
|
|
|
help: Tests mutliple values with required delimiter
|
|
|
|
multiple: true
|
|
|
|
require_delimiter: true
|
2016-09-30 21:54:14 +00:00
|
|
|
- singlealias:
|
|
|
|
long: singlealias
|
|
|
|
help: Tests single alias
|
|
|
|
aliases: [alias]
|
2016-12-29 04:18:07 +00:00
|
|
|
required_if:
|
|
|
|
- [multvalsmo, two]
|
2016-09-30 21:54:14 +00:00
|
|
|
- multaliases:
|
|
|
|
long: multaliases
|
|
|
|
help: Tests mutliple aliases
|
|
|
|
aliases: [als1, als2, als3]
|
2015-08-31 03:26:17 +00:00
|
|
|
- minvals2:
|
|
|
|
long: minvals2
|
|
|
|
multiple: true
|
|
|
|
help: Tests 2 min vals
|
|
|
|
min_values: 2
|
|
|
|
- maxvals3:
|
|
|
|
long: maxvals3
|
|
|
|
multiple: true
|
|
|
|
help: Tests 3 max vals
|
|
|
|
max_values: 3
|
2015-09-06 20:34:15 +00:00
|
|
|
arg_groups:
|
2015-09-04 17:58:00 +00:00
|
|
|
- test:
|
2015-10-01 01:45:35 +00:00
|
|
|
args:
|
2015-09-04 17:58:00 +00:00
|
|
|
- maxvals3
|
|
|
|
- minmals2
|
|
|
|
conflicts_with:
|
|
|
|
- option3
|
|
|
|
requires:
|
|
|
|
- multvals
|
2015-08-31 03:26:17 +00:00
|
|
|
subcommands:
|
|
|
|
- subcmd:
|
|
|
|
about: tests subcommands
|
2016-08-28 03:42:31 +00:00
|
|
|
version: "0.1"
|
2015-08-31 03:26:17 +00:00
|
|
|
author: Kevin K. <kbknapp@gmail.com>
|
|
|
|
args:
|
|
|
|
- scoption:
|
|
|
|
short: o
|
|
|
|
long: option
|
|
|
|
multiple: true
|
|
|
|
help: tests options
|
|
|
|
takes_value: true
|
|
|
|
- scpositional:
|
|
|
|
help: tests positionals
|
2015-09-01 03:15:08 +00:00
|
|
|
index: 1
|