Skip to content

Commit

Permalink
test(examples): Verify all features
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jul 17, 2023
1 parent 0ba987f commit 97f4c72
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ fn example_tests() {
"std",
#[cfg(feature = "color")]
"color",
#[cfg(feature = "help")]
"help",
#[cfg(feature = "usage")]
"usage",
#[cfg(feature = "error-context")]
"error-context",
#[cfg(feature = "suggestions")]
"suggestions",
// Optional
Expand All @@ -28,8 +34,10 @@ fn example_tests() {
#[cfg(feature = "string")]
"string",
// In-work
#[cfg(feature = "unstable-replace")]
"unstable-replace",
//#[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());
Expand Down
10 changes: 10 additions & 0 deletions tests/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ fn ui_tests() {
"std",
#[cfg(feature = "color")]
"color",
#[cfg(feature = "help")]
"help",
#[cfg(feature = "usage")]
"usage",
#[cfg(feature = "error-context")]
"error-context",
#[cfg(feature = "suggestions")]
"suggestions",
// Optional
Expand All @@ -28,6 +34,10 @@ fn ui_tests() {
#[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());
Expand Down

0 comments on commit 97f4c72

Please sign in to comment.