clap/tests/ui.rs
Ed Page 56fe5e0ec0 fix!: Remove unstable-replace feature flag
This has been implemented for 3 years without much traction for
finishing it up.

The subcommand use case can be worked around by creating `Command`s that
just include the relevant logic, very similar to the default subcommand
examples in `git` / `git-derive`.

Using this for flags is covered by #4793.

Without `unstable-replace` being enabled, this still cut 5 KiB from
`cargo bloat --release --example git`.

Closes #2836
Closes #2011
2023-03-28 00:26:45 -05:00

32 lines
817 B
Rust

#![cfg(not(tarpaulin))]
#[test]
#[cfg(feature = "help")]
#[cfg(feature = "error-context")]
#[cfg(feature = "usage")]
fn ui_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",
]
.join(" ");
t.register_bins(trycmd::cargo::compile_examples(["--features", &features]).unwrap());
t.case("tests/ui/*.toml");
}