-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 some files to snapbox #14113
base: master
Are you sure you want to change the base?
Conversation
1bf5eea
to
f7b0fac
Compare
} | ||
|
||
#[cargo_test] | ||
fn list_builtin_aliases_with_descriptions() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the output on the right is complete, the test case here is deleted.
@@ -132,6 +178,7 @@ fn list_command_looks_at_path_case_mismatch() { | |||
); | |||
} | |||
|
|||
#[allow(deprecated)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since with_stdout_does_not_contain
,add #[allow(deprecated)]
.
f7b0fac
to
7c172ec
Compare
cd4aa8c
to
464d232
Compare
☔ The latest upstream changes (presumably #14126) made this pull request unmergeable. Please resolve the merge conflicts. |
Could you clean up the commit history? |
tests/testsuite/cargo_command.rs
Outdated
.with_stdout_data(str![[r#" | ||
[CARGO_PATH] | ||
"#]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this was already a "self updating" test output and I believe the design of it means that there is little to evolve that we'd need to allow snapshotting more from this.
Should we keep the expected-str generation that was in here before, just switching the assert method used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not possible to just convert with_stdout
to with_stdout_data
, such as the error reported below:
--- Expected
++++ actual: stdout
1 - /home/heisen/temp/temp/temp/cargo/target/debug/cargo∅
1 + /home/heisen/temp/temp/temp/cargo/target/debug/cargo
Need to add line breaks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding in a newline is trivial and doesn't invalidate the idea I mentioned that this is unlikely to have surrounding text that gets regularly changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been modified and you can see if it meets the requirements.
d13e4b1
to
204d05d
Compare
204d05d
to
c335fb0
Compare
What does this PR try to resolve?
Changes to the following documents were completed:
tests/testsuite/cargo_command.rs
tests/testsuite/cargo_env_config.rs
tests/testsuite/cargo_features.rs
tests/testsuite/cargo_targets.rs
part of #14039