Skip to content
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

cargotest: Fix with_*_does_not_contain to support [..] and macro matching. #5392

Merged
merged 1 commit into from
Apr 19, 2018

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Apr 19, 2018

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.

@alexcrichton
Copy link
Member

Awesome, thanks!

@bors: r+

I'd definitely be up for documentation in cargotest :)

It's pretty disorganized right now and could definitely use some love.

@bors
Copy link
Contributor

bors commented Apr 19, 2018

📌 Commit e7896a2 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Apr 19, 2018

⌛ Testing commit e7896a2 with merge a04e2e5...

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.
@bors
Copy link
Contributor

bors commented Apr 19, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing a04e2e5 to master...

@bors bors merged commit e7896a2 into rust-lang:master Apr 19, 2018
@ehuss ehuss added this to the 1.27.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants