mirror of
https://github.com/clap-rs/clap
synced 2024-11-14 16:47:21 +00:00
2d83a7b12e
This is a cheap pass at creating this to allow cutting out the cost of rich error information / programmatic error information. This cuts about 20 KiB off of the binary. There is more we could cut out, like collecting of used arguments for the usage, but I want to keep the conditionals simple.
34 lines
918 B
Rust
34 lines
918 B
Rust
#![cfg(not(tarpaulin))]
|
|
|
|
#[test]
|
|
#[cfg(feature = "error-context")]
|
|
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",
|
|
#[cfg(feature = "unstable-grouped")]
|
|
"unstable-grouped",
|
|
]
|
|
.join(" ");
|
|
t.register_bins(trycmd::cargo::compile_examples(["--features", &features]).unwrap());
|
|
t.case("examples/**/*.md");
|
|
}
|