aboutsummaryrefslogtreecommitdiff
path: root/clap/tests/app.yml
blob: 850bb822aeff587c4e5221b8e0ddffc7a78396d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: claptests
version: "1.0"
about: tests clap library
author: Kevin K. <kbknapp@gmail.com>
settings:
    - ArgRequiredElseHelp
help_message: prints help with a nonstandard description
args:
    - opt:
        short: o
        long: option
        multiple: true
        help: tests options
    - positional:
        help: tests positionals
        index: 1
    - positional2:
        help: tests positionals with exclusions
        index: 2
        default_value_if:
            - [flag, Null, some]
            - [postional, other, something]
    - 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
        conflicts_with:
            - option
        requires:
            - positional2
    - option3:
        short: O
        long: Option
        help: tests options with specific value sets
        takes_value: true
        possible_values:
            - fast
            - slow
        requires_if:
            - [fast, flag]
    - positional3:
        index: 3
        help: tests positionals with specific values
        possible_values: [ vi, emacs ]
    - multvals:
        long: multvals
        help: Tests multiple values, not mult occs
        value_names:
            - one
            - two
    - multvalsmo:
        long: multvalsmo
        multiple: true
        help: Tests multiple values, not mult occs
        value_names: [one, two]
    - multvalsdelim:
        long: multvalsdelim
        help: Tests multiple values with required delimiter
        multiple: true
        require_delimiter: true
    - singlealias:
        long: singlealias
        help: Tests single alias
        aliases: [alias]
        required_if:
            - [multvalsmo, two]
    - multaliases:
        long: multaliases
        help: Tests multiple aliases
        aliases: [als1, als2, als3]
    - 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
    - case_insensitive:
        help: Test case_insensitive
        possible_values: [test123, test321]
        case_insensitive: true

arg_groups:
    - test:
        args:
            - maxvals3
            - minmals2
        conflicts_with:
            - option3
        requires:
            - multvals
subcommands:
    - subcmd:
        about: tests subcommands
        version: "0.1"
        author: Kevin K. <kbknapp@gmail.com>
        args:
            - scoption:
                short: o
                long: option
                multiple: true
                help: tests options
                takes_value: true
            - scpositional:
                help: tests positionals
                index: 1