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:
|
2019-06-19 22:49:09 +00:00
|
|
|
- help:
|
|
|
|
short: h
|
|
|
|
long: help
|
2021-11-18 16:17:15 +00:00
|
|
|
help: prints help with a nonstandard description
|
2020-04-09 16:19:05 +00:00
|
|
|
- option:
|
2015-08-31 03:26:17 +00:00
|
|
|
short: o
|
|
|
|
long: option
|
2021-02-24 15:07:57 +00:00
|
|
|
takes_value: true
|
2021-06-01 18:36:43 +00:00
|
|
|
multiple_values: true
|
2021-11-18 16:17:15 +00:00
|
|
|
help: tests options
|
2015-08-31 03:26:17 +00:00
|
|
|
- positional:
|
2021-11-18 16:17:15 +00:00
|
|
|
help: tests positionals
|
2015-09-01 03:15:08 +00:00
|
|
|
index: 1
|
2015-08-31 03:26:17 +00:00
|
|
|
- positional2:
|
2021-11-18 16:17:15 +00:00
|
|
|
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:
|
2020-08-14 15:46:51 +00:00
|
|
|
- [flag, null, some]
|
2020-07-18 17:47:04 +00:00
|
|
|
- [positional, other, something]
|
2015-08-31 03:26:17 +00:00
|
|
|
- flag:
|
|
|
|
short: f
|
|
|
|
long: flag
|
2021-02-24 15:07:57 +00:00
|
|
|
takes_value: true
|
2021-06-01 18:36:43 +00:00
|
|
|
multiple_values: true
|
2021-11-18 16:17:15 +00:00
|
|
|
help: tests flags
|
2015-08-31 03:26:17 +00:00
|
|
|
global: true
|
|
|
|
- flag2:
|
|
|
|
short: F
|
2021-11-18 16:17:15 +00:00
|
|
|
help: tests flags with exclusions
|
2015-08-31 03:26:17 +00:00
|
|
|
conflicts_with:
|
|
|
|
- flag
|
|
|
|
requires:
|
|
|
|
- option2
|
|
|
|
- option2:
|
|
|
|
long: long-option-2
|
2021-11-18 16:17:15 +00:00
|
|
|
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
|
2021-10-26 22:22:35 +00:00
|
|
|
long: option3
|
2021-11-18 16:17:15 +00:00
|
|
|
help: tests options with specific value sets
|
2015-08-31 03:26:17 +00:00
|
|
|
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
|
2021-11-18 16:17:15 +00:00
|
|
|
help: tests positionals with specific values
|
2015-08-31 03:26:17 +00:00
|
|
|
possible_values: [ vi, emacs ]
|
|
|
|
- multvals:
|
|
|
|
long: multvals
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Tests multiple values, not mult occs
|
2015-08-31 03:26:17 +00:00
|
|
|
value_names:
|
|
|
|
- one
|
|
|
|
- two
|
|
|
|
- multvalsmo:
|
|
|
|
long: multvalsmo
|
2021-06-01 18:36:43 +00:00
|
|
|
multiple_values: true
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Tests multiple values, not mult occs
|
2015-08-31 03:26:17 +00:00
|
|
|
value_names: [one, two]
|
2016-09-06 16:30:31 +00:00
|
|
|
- multvalsdelim:
|
|
|
|
long: multvalsdelim
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Tests multiple values with required delimiter
|
2021-02-24 15:07:57 +00:00
|
|
|
takes_value: true
|
2021-06-01 18:36:43 +00:00
|
|
|
multiple_occurrences: true
|
2021-02-24 15:07:57 +00:00
|
|
|
use_delimiter: true
|
2016-09-06 16:30:31 +00:00
|
|
|
require_delimiter: true
|
2021-05-07 06:32:34 +00:00
|
|
|
- settings:
|
|
|
|
short: s
|
|
|
|
takes_value: true
|
|
|
|
multiple_values: true
|
2016-09-30 21:54:14 +00:00
|
|
|
- singlealias:
|
|
|
|
long: singlealias
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Tests single alias
|
2016-09-30 21:54:14 +00:00
|
|
|
aliases: [alias]
|
2020-05-23 14:02:03 +00:00
|
|
|
required_if_eq:
|
2016-12-29 04:18:07 +00:00
|
|
|
- [multvalsmo, two]
|
2016-09-30 21:54:14 +00:00
|
|
|
- multaliases:
|
|
|
|
long: multaliases
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Tests multiple aliases
|
2016-09-30 21:54:14 +00:00
|
|
|
aliases: [als1, als2, als3]
|
2020-05-03 06:13:24 +00:00
|
|
|
- singleshortalias:
|
|
|
|
long: singleshortalias
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Tests single short alias
|
2020-05-03 06:13:24 +00:00
|
|
|
short_aliases: [a]
|
2020-05-23 14:02:03 +00:00
|
|
|
required_if_eq:
|
2020-05-03 06:13:24 +00:00
|
|
|
- [multvalsmo, two]
|
|
|
|
- multshortaliases:
|
|
|
|
long: multshortaliases
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Tests multiple short aliases
|
2020-08-02 16:52:12 +00:00
|
|
|
short_aliases: [b, c]
|
2015-08-31 03:26:17 +00:00
|
|
|
- minvals2:
|
|
|
|
long: minvals2
|
2021-06-01 18:36:43 +00:00
|
|
|
multiple_values: true
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Tests 2 min vals
|
2015-08-31 03:26:17 +00:00
|
|
|
min_values: 2
|
|
|
|
- maxvals3:
|
|
|
|
long: maxvals3
|
2021-06-01 18:36:43 +00:00
|
|
|
multiple_values: true
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Tests 3 max vals
|
2015-08-31 03:26:17 +00:00
|
|
|
max_values: 3
|
2020-01-05 18:46:28 +00:00
|
|
|
- exclusive:
|
|
|
|
long: exclusive
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Tests 3 exclusive
|
2020-01-05 18:46:28 +00:00
|
|
|
exclusive: true
|
2018-11-05 03:46:32 +00:00
|
|
|
- case_insensitive:
|
2020-05-12 08:39:24 +00:00
|
|
|
index: 4
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Test case_insensitive
|
2018-11-05 03:46:32 +00:00
|
|
|
possible_values: [test123, test321]
|
|
|
|
case_insensitive: true
|
2020-04-07 23:34:53 +00:00
|
|
|
- value_hint:
|
|
|
|
long: value-hint
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Test value_hint
|
2020-04-07 23:34:53 +00:00
|
|
|
value_hint: FilePath
|
2021-05-07 06:32:34 +00:00
|
|
|
- verbose:
|
|
|
|
short: v
|
|
|
|
multiple_occurrences: true
|
|
|
|
takes_value: false
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Sets the level of verbosity
|
2021-01-19 20:47:17 +00:00
|
|
|
- visiblealiases:
|
|
|
|
long: visiblealiases
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Tests visible aliases
|
2021-01-19 20:47:17 +00:00
|
|
|
visible_alias: visals1
|
|
|
|
visible_aliases: [visals2, visals2, visals3]
|
|
|
|
- visibleshortaliases:
|
|
|
|
long: visibleshortaliases
|
2021-11-18 16:17:15 +00:00
|
|
|
help: Tests visible short aliases
|
2021-01-19 20:47:17 +00:00
|
|
|
visible_short_alias: e
|
|
|
|
visible_short_aliases: [l, m]
|
2021-06-01 18:36:43 +00:00
|
|
|
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
|
2021-06-01 18:36:43 +00:00
|
|
|
- minvals2
|
2015-09-04 17:58:00 +00:00
|
|
|
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
|
2021-06-01 18:36:43 +00:00
|
|
|
multiple_values: true
|
2021-11-18 16:17:15 +00:00
|
|
|
help: tests options
|
2015-08-31 03:26:17 +00:00
|
|
|
takes_value: true
|
|
|
|
- scpositional:
|
2021-11-18 16:17:15 +00:00
|
|
|
help: tests positionals
|
2015-09-01 03:15:08 +00:00
|
|
|
index: 1
|