mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
parent
ed57969d9e
commit
65ce9493b7
1 changed files with 35 additions and 0 deletions
35
projects/crates.io/argc/package.yml
Normal file
35
projects/crates.io/argc/package.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
distributable:
|
||||
url: https://github.com/sigoden/argc/archive/refs/tags/{{ version.tag }}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
provides:
|
||||
- bin/argc
|
||||
|
||||
versions:
|
||||
github: sigoden/argc
|
||||
strip: /v/
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
rust-lang.org: '>=1.56'
|
||||
rust-lang.org/cargo: '*'
|
||||
script: cargo install --locked --path . --root {{prefix}}
|
||||
|
||||
test:
|
||||
- test "$(argc --argc-version)" = "argc {{version}}"
|
||||
- run: cat $FIXTURE && bash $FIXTURE -F --bar=xyz --baz a --baz b v1 v2 >test.out
|
||||
fixture: |
|
||||
# @flag -F --foo Flag value
|
||||
# @option --bar Option value
|
||||
# @option --baz* Option values
|
||||
# @arg val* Positional values
|
||||
|
||||
eval "$(argc --argc-eval "$0" "$@")"
|
||||
echo foo: $argc_foo
|
||||
echo bar: $argc_bar
|
||||
echo baz: ${argc_baz[@]}
|
||||
echo val: ${argc_val[@]}
|
||||
- "grep 'foo: 1' test.out"
|
||||
- "grep 'bar: xyz' test.out"
|
||||
- "grep 'baz: a b' test.out"
|
||||
- "grep 'val: v1 v2' test.out"
|
Loading…
Reference in a new issue