cargotest: Fix with_*_does_not_contain to support [..] and macro matching.#5392
Merged
bors merged 1 commit intorust-lang:masterfrom Apr 19, 2018
Merged
cargotest: Fix with_*_does_not_contain to support [..] and macro matching.#5392bors merged 1 commit intorust-lang:masterfrom
with_*_does_not_contain to support [..] and macro matching.#5392bors merged 1 commit intorust-lang:masterfrom
Conversation
Member
|
Awesome, thanks! @bors: r+ I'd definitely be up for documentation in It's pretty disorganized right now and could definitely use some love. |
Contributor
|
📌 Commit e7896a2 has been approved by |
Contributor
bors
added a commit
that referenced
this pull request
Apr 19, 2018
cargotest: Fix `with_*_does_not_contain` to support `[..]` and macro matching. I changed it so that it is essentially the opposite of `with_*_contains` to keep it symmetric. Any in-flight PRs using the old style will need to be updated (else they will incorrectly silently pass). Alternatively, we could rename the method to avoid that. The following tests contained brackets, so they were not checking what they thought they were checking. I did a cursory look at them, but perhaps someone else could double-check that they make sense. Asserting what *doesn't* happen can be tricky since there is an infinite number of things that won't happen. Preferably a test would assert that it appears in one scenario and not another (like `incremental_profile` does), but some of them don't or can't. ``` build::incremental_profile build::incremental_config build::cargo_compile_with_workspace_excluded build::build_all_exclude build::targets_selected_default check::targets_selected_default check::check_filters rustc::targets_selected_default rustc_info_cache::rustc_info_cache warn_on_failure::no_warning_on_bin_failure warn_on_failure::warning_on_lib_failure ``` BTW, would you be interested in a PR that adds some documentation to `cargotest`? I've discovered things I didn't know where there. I think some docstrings on some of the methods, and a short guide for new contributors would be helpful.
Contributor
|
☀️ Test successful - status-appveyor, status-travis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I changed it so that it is essentially the opposite of
with_*_containsto keep it symmetric.Any in-flight PRs using the old style will need to be updated (else they will incorrectly silently pass). Alternatively, we could rename the method to avoid that.
The following tests contained brackets, so they were not checking what they thought they were checking. I did a cursory look at them, but perhaps someone else could double-check that they make sense. Asserting what doesn't happen can be tricky since there is an infinite number of things that won't happen. Preferably a test would assert that it appears in one scenario and not another (like
incremental_profiledoes), but some of them don't or can't.BTW, would you be interested in a PR that adds some documentation to
cargotest?I've discovered things I didn't know where there. I think some docstrings on some of the methods, and a short guide for new contributors would be helpful.