mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
45 lines
1.2 KiB
Rust
45 lines
1.2 KiB
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 = [
|
|
// Default
|
|
#[cfg(feature = "std")]
|
|
"std",
|
|
#[cfg(feature = "color")]
|
|
"color",
|
|
#[cfg(feature = "help")]
|
|
"help",
|
|
#[cfg(feature = "usage")]
|
|
"usage",
|
|
#[cfg(feature = "error-context")]
|
|
"error-context",
|
|
#[cfg(feature = "suggestions")]
|
|
"suggestions",
|
|
// Optional
|
|
#[cfg(feature = "derive")]
|
|
"derive",
|
|
#[cfg(feature = "cargo")]
|
|
"cargo",
|
|
#[cfg(feature = "wrap_help")]
|
|
"wrap_help",
|
|
#[cfg(feature = "env")]
|
|
"env",
|
|
#[cfg(feature = "unicode")]
|
|
"unicode",
|
|
#[cfg(feature = "string")]
|
|
"string",
|
|
// In-work
|
|
//#[cfg(feature = "unstable-v5")] // Currently has failures
|
|
//"unstable-v5",
|
|
#[cfg(feature = "unstable-styles")]
|
|
"unstable-styles",
|
|
]
|
|
.join(" ");
|
|
t.register_bins(trycmd::cargo::compile_examples(["--features", &features]).unwrap());
|
|
t.case("examples/**/*.md");
|
|
}
|