mirror of
https://github.com/wader/fq.git
synced 2024-11-23 18:56:52 +03:00
22 lines
377 B
Plaintext
22 lines
377 B
Plaintext
include "assert";
|
|
include "args";
|
|
|
|
[ { name: "Basic parse",
|
|
args: ["-a", "123", "b"],
|
|
opts: {
|
|
"a": {
|
|
short: "-a",
|
|
long: "--abc",
|
|
description: "Set abc",
|
|
string: true
|
|
}
|
|
},
|
|
expected: {
|
|
"parsed": {
|
|
"a": "123"
|
|
},
|
|
"rest": ["b"]
|
|
}
|
|
}
|
|
][] | assert(.name; _args_parse(.args; .opts); .expected)
|