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

test: migrate features_are_quoted to snapbox #14051

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

henry40408
Copy link
Contributor

What does this PR try to resolve?

Part of #14039.

Migrate tests/testsuite/shell_quoting.rs to snapbox.

How should we test and review this PR?

N/A

Additional information

N/A

@rustbot
Copy link
Collaborator

rustbot commented Jun 12, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 12, 2024
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

Comment on lines 34 to 40
error[E0425]: cannot find value `error` in this scope
--> src/main.rs:1:12
|
1 | fn main() {error}
| ^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snapshotting rustc output is a bit risky. If applicable we should omit it by ....

Suggested change
error[E0425]: cannot find value `error` in this scope
--> src/main.rs:1:12
|
1 | fn main() {error}
| ^^^^^ not found in this scope
For more information about this error, try `rustc --explain E0425`.
...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By risky I mean rustc output is not guaranteed stable and might break cargo test suites between different toolchain versions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this to the porting steps

  • If replacing a contains with an equality check, use multi-line globs (...) for rustc errors that weren't previously matched to minimize tying Cargo's tests to the exact output of rustc

tests/testsuite/shell_quoting.rs Outdated Show resolved Hide resolved
tests/testsuite/shell_quoting.rs Outdated Show resolved Hide resolved
tests/testsuite/shell_quoting.rs Outdated Show resolved Hide resolved
@henry40408 henry40408 force-pushed the issue-14039-shell-quoting branch from 4851d22 to 3a19de7 Compare June 13, 2024 12:10
@weihanglo
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jun 13, 2024

📌 Commit 3a19de7 has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 13, 2024
@bors
Copy link
Contributor

bors commented Jun 13, 2024

⌛ Testing commit 3a19de7 with merge 5f0294b...

@bors
Copy link
Contributor

bors commented Jun 13, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 5f0294b to master...

@bors bors merged commit 5f0294b into rust-lang:master Jun 13, 2024
22 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 15, 2024
Update cargo

13 commits in 4dcbca118ab7f9ffac4728004c983754bc6a04ff..a1f47ec3f7cd076986f1bfcd7061f2e8cb1a726e
2024-06-11 16:27:02 +0000 to 2024-06-15 01:10:07 +0000
- Change verification order during packaging. (rust-lang/cargo#14074)
- Update git2 for libgit2 1.8.1 (rust-lang/cargo#14067)
- Fix some documentation misspellings (rust-lang/cargo#14066)
- chore(deps): update msrv (1 version) to v1.79 (rust-lang/cargo#14063)
- test: Redact conditional compile-fail warning (rust-lang/cargo#14064)
- Migrate a few test files to snapbox (rust-lang/cargo#14048)
- docs(contrib): Improve triage instructions (rust-lang/cargo#14052)
- chore(ci): Upgrade cargo-semver-checks (rust-lang/cargo#14062)
- Revert rust-lang/cargo#13630 as rustc ignores `-C strip` on MSVC (rust-lang/cargo#14061)
- test: migrate features_are_quoted to snapbox (rust-lang/cargo#14051)
- Add assert redactions (rust-lang/cargo#14054)
- test: migrate build_script_env to snapbox (rust-lang/cargo#14044)
- docs: Iterate on --breaking docs (rust-lang/cargo#14047)

r? ghost
@rustbot rustbot added this to the 1.81.0 milestone Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants