mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
b4f111a978
This let's you get an arguments values, grouped by the occurrence of the argument. Note: this does not stablize derive support. That requires a blocking change and can be enabled via `unstable-v5` flag. See #4626 for an exploration of how we can make this easier in the future. Fixes #2924
34 lines
896 B
Rust
34 lines
896 B
Rust
#![cfg(not(tarpaulin))]
|
|
|
|
#[test]
|
|
#[cfg(feature = "help")]
|
|
#[cfg(feature = "error-context")]
|
|
#[cfg(feature = "usage")]
|
|
fn example_tests() {
|
|
let t = trycmd::TestCases::new();
|
|
let features = [
|
|
#[cfg(feature = "std")]
|
|
"std",
|
|
#[cfg(feature = "derive")]
|
|
"derive",
|
|
#[cfg(feature = "cargo")]
|
|
"cargo",
|
|
#[cfg(feature = "color")]
|
|
"color",
|
|
#[cfg(feature = "env")]
|
|
"env",
|
|
#[cfg(feature = "suggestions")]
|
|
"suggestions",
|
|
#[cfg(feature = "unicode")]
|
|
"unicode",
|
|
#[cfg(feature = "string")]
|
|
"string",
|
|
#[cfg(feature = "wrap_help")]
|
|
"wrap_help",
|
|
#[cfg(feature = "unstable-replace")]
|
|
"unstable-replace",
|
|
]
|
|
.join(" ");
|
|
t.register_bins(trycmd::cargo::compile_examples(["--features", &features]).unwrap());
|
|
t.case("examples/**/*.md");
|
|
}
|