clap/tests/examples.rs
Ed Page 686b0379ce feat(multicall): Stablize multicall
`multicall` allows you to have one binary expose itself as multiple
programs, like busybox does.  This also works well for user clap for
parsing REPLs.

Fixes #2861
2022-05-20 12:20:40 -05:00

31 lines
831 B
Rust

#![cfg(not(tarpaulin))]
#[test]
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 = "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");
}