-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add cargo {test,doc,...} --all-features #1173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I’d also like test:
cargo test --features query_encoding
cargo test |
Hmm. What about combinations of features? for example [features]
a = []
b = [] Would there be 3 runs:
Or also a fourth?
|
I'd personally expect this to just pass |
Since Cargo doesn’t know how features interact with each other, I think this should be left to the library author. The default would be a single run with no features enabled (unless given on the command line), but [lib]
test_features = [[], ["query_encoding"]] [lib]
test_features = [[], ["a"], ["b"], ["a", "b"]] |
I'm currently working on implementing support for a basic I personally would prefer doing what seems most intuitive, just enabling all features. |
Implemented in #3038, but without special feature sets for testing. |
Add --all-features flag to cargo As (more or less) requested in #1173 I added a `--all-features` flag to cargo that builds all available features. I hope I documented it in all the right places. If there's something weird or wrong, please give me a heads up.
When running tests on travis, you usually want to enable all the features when running
cargo test
. However this requires manually passing all non-default-features one-by-one. It is easy to forget one.An option should be added to enable all the features.
The follow-up should be to submit a PR or open an issue to travis so that its engine runs
cargo test --verbose --all-features
instead of justcargo test --verbose
by default.The text was updated successfully, but these errors were encountered: