2020-08-24 17:23:37 +00:00
|
|
|
#![cfg(not(tarpaulin))]
|
|
|
|
|
2020-08-23 16:49:05 +00:00
|
|
|
#[test]
|
2022-09-19 16:54:06 +00:00
|
|
|
#[cfg(feature = "help")]
|
2022-09-19 14:59:04 +00:00
|
|
|
#[cfg(feature = "error-context")]
|
2022-09-19 15:43:39 +00:00
|
|
|
#[cfg(feature = "usage")]
|
2021-11-10 22:15:30 +00:00
|
|
|
fn example_tests() {
|
|
|
|
let t = trycmd::TestCases::new();
|
2021-11-23 21:59:56 +00:00
|
|
|
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",
|
2022-09-16 16:52:55 +00:00
|
|
|
#[cfg(feature = "string")]
|
|
|
|
"string",
|
2021-11-23 21:59:56 +00:00
|
|
|
#[cfg(feature = "wrap_help")]
|
|
|
|
"wrap_help",
|
2021-12-09 03:06:51 +00:00
|
|
|
#[cfg(feature = "unstable-replace")]
|
|
|
|
"unstable-replace",
|
2021-11-23 21:59:56 +00:00
|
|
|
]
|
|
|
|
.join(" ");
|
|
|
|
t.register_bins(trycmd::cargo::compile_examples(["--features", &features]).unwrap());
|
2021-11-30 18:30:19 +00:00
|
|
|
t.case("examples/**/*.md");
|
2020-08-23 16:49:05 +00:00
|
|
|
}
|