Skip to content

fix: Make ui_tests test conditional on env feature#6318

Merged
epage merged 1 commit intoclap-rs:masterfrom
casey:fix-ui-tests
Mar 27, 2026
Merged

fix: Make ui_tests test conditional on env feature#6318
epage merged 1 commit intoclap-rs:masterfrom
casey:fix-ui-tests

Conversation

@casey
Copy link
Contributor

@casey casey commented Mar 26, 2026

cargo test --test ui is failing both locally on CI, I think because it expects the env feature, which is not a default feature.

This PR adds #[cfg(feature = "env")] to ui_tests, disabling the test when the feature is unavailable.

cargo test and cargo test --features env now both pass.

@epage
Copy link
Member

epage commented Mar 26, 2026

on CI

Could you point me to that failure?

@casey
Copy link
Contributor Author

casey commented Mar 26, 2026

Could you point me to that failure?

Whoops, I was confusing this with another error. In any case, this does make cargo test pass for me locally, when otherwise it fails, and cargo test --features env runs the UI tests and also passes.

@epage
Copy link
Member

epage commented Mar 27, 2026

make test-default, which we run in CI, should catch this. The problem is clap_mangen is forcing env on when it shouldn't. I'll look into fixing that after merging this.

@epage epage merged commit 87f57fa into clap-rs:master Mar 27, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants