mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 14:22:34 +00:00
bfa02fd418
This ports our example testing over to [trycmd](https://docs.rs/) so we can: - More thoroughly test our examples - Provide always-up-to-date example usage The old way of testing automatically picked up examples. This new way requires we have a `.md` file that uses the example in some way. Notes: - Moved overall example description to the `.md` file - I added cross-linking between related examples - `14_groups` had a redundant paragraph (twice talked about "one and only one"
13 lines
357 B
Rust
13 lines
357 B
Rust
#![cfg(not(tarpaulin))]
|
|
|
|
#[test]
|
|
fn example_tests() {
|
|
let t = trycmd::TestCases::new();
|
|
t.register_bins(trycmd::cargo::compile_examples([]).unwrap());
|
|
t.case("examples/*.md");
|
|
#[cfg(not(feature = "unstable-multicall"))]
|
|
{
|
|
t.skip("examples/24a_multicall_busybox.md");
|
|
t.skip("examples/24b_multicall_hostname.md");
|
|
}
|
|
}
|