test: mirgate fix* and future_incompat_report to snapbox#14173
test: mirgate fix* and future_incompat_report to snapbox#14173bors merged 3 commits intorust-lang:masterfrom
Conversation
|
r? @weihanglo rustbot has assigned @weihanglo. Use |
| p.cargo("fix").cwd("src").run(); | ||
| } | ||
|
|
||
| #[allow(deprecated)] |
There was a problem hiding this comment.
with_stderr_does_not_contain is being used in this function.
| .run(); | ||
| } | ||
|
|
||
| #[allow(deprecated)] |
There was a problem hiding this comment.
with_stderr_does_not_contain is being used in this function.
| .run(); | ||
| } | ||
|
|
||
| #[allow(deprecated)] |
There was a problem hiding this comment.
with_stderr_does_not_contain is being used in this function.
| } | ||
| } | ||
|
|
||
| #[allow(deprecated)] |
There was a problem hiding this comment.
with_stderr_does_not_contain is being used in this function
| assert_eq!(lines.next(), None); | ||
| } | ||
|
|
||
| #[allow(deprecated)] |
There was a problem hiding this comment.
with_stdout_does_not_contain is being used in this function.
| p.cargo("fix --edition --allow-no-vcs") | ||
| .with_stderr_contains("[CHECKING] foo [..]") | ||
| .with_stderr_contains(&format!( | ||
| "\ | ||
| [WARNING] `src/lib.rs` is already on the latest edition ({latest_stable}), unable to migrate further | ||
| ", | ||
| latest_stable = latest_stable | ||
| )) | ||
| .with_stderr_data(str![]) | ||
| .run(); |
There was a problem hiding this comment.
I'm not sure why this isn't being overwritten. Is this fix even running?
There was a problem hiding this comment.
No. I think we can add deprecated and leave off for now.
Lines 881 to 885 in c7cb45c
tests/testsuite/fix.rs
Outdated
| .with_stderr_data(str![[r#" | ||
| ... | ||
| [FIXED] src/lib.rs ([..] fixes) | ||
| ... | ||
| "#]]) | ||
| .with_stderr_data( |
There was a problem hiding this comment.
Why do you need two separate assertions?
Also mind the plurality. Maybe ([..] fix[..])?
There was a problem hiding this comment.
Oh, I forgot to mention this! It sometimes generate two entries:
1 1 | [COMPILING] foo v0.0.1 ([ROOT]/foo)
2 2 | [FIXED] build.rs (1 fix)
3 3 | [FIXED] src/main.rs (1 fix)
4 4 | [FIXED] examples/foo.rs (1 fix)
5 5 | [FIXED] tests/a.rs (1 fix)
6 6 | [FIXED] src/lib.rs ([..]fix[..])
7 7 | [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
8 + [FIXED] src/lib.rs (1 fix)
Do you prefer something looks more like this?
.with_stderr_data(
str![[r#"
[COMPILING] foo v0.0.1 ([ROOT]/foo)
[FIXED] build.rs (1 fix)
[FIXED] src/lib.rs ([..]fix[..])
[FIXED] src/main.rs (1 fix)
[FIXED] examples/foo.rs (1 fix)
[FIXED] tests/a.rs (1 fix)
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
...
"#]]There was a problem hiding this comment.
Yes. Based on the comment, I think that matches the behavior of the old assertion and is still valid today.
| p.cargo("fix --edition --allow-no-vcs") | ||
| .with_stderr_contains("[CHECKING] foo [..]") | ||
| .with_stderr_contains(&format!( | ||
| "\ | ||
| [WARNING] `src/lib.rs` is already on the latest edition ({latest_stable}), unable to migrate further | ||
| ", | ||
| latest_stable = latest_stable | ||
| )) | ||
| .with_stderr_data(str![]) | ||
| .run(); |
There was a problem hiding this comment.
No. I think we can add deprecated and leave off for now.
Lines 881 to 885 in c7cb45c
|
Feedbacks addressed! Thanks for the review! |
|
Thanks! @bors r+ |
test: mirgate fix* and future_incompat_report to snapbox ### What does this PR try to resolve? Part of #14039. Migrate following to snapbox: - `tests/testsuite/fix.rs` - `tests/testsuite/fix_n_times.rs` - `tests/testsuite/future_incompat_report.rs`
|
💔 Test failed - checks-actions |
|
This is a new one. Let us retry @bors retry |
|
☀️ Test successful - checks-actions |
Update cargo 23 commits in 4ed7bee47f7dd4416b36fada1909e9a62c546246..a515d463427b3912ec0365d106791f88c1c14e1b 2024-06-25 16:28:22 +0000 to 2024-07-02 20:53:36 +0000 - test: migrate rust_version and rustc* to snapbox (rust-lang/cargo#14177) - test: mirgate fix* and future_incompat_report to snapbox (rust-lang/cargo#14173) - test:migrate `edition/error` to snapbox (rust-lang/cargo#14175) - chore(deps): update compatible (rust-lang/cargo#14174) - refactor(source): Clean up after PathSource/RecursivePathSource split (rust-lang/cargo#14169) - test: Migrate some files to snapbox (rust-lang/cargo#14132) - test: fix several assertions (rust-lang/cargo#14167) - test: replace glob with explicit unordered calls (rust-lang/cargo#14166) - Make it clear that `CARGO_CFG_TARGET_FAMILY` is multi-valued (rust-lang/cargo#14165) - Document `CARGO_CFG_TARGET_ABI` (rust-lang/cargo#14164) - test: Migrate git to snapbox (rust-lang/cargo#14159) - test: migrate some files to snapbox (rust-lang/cargo#14158) - test: migrate registry and registry_auth to snapbox (rust-lang/cargo#14149) - gix: remove `revision` feature from cargo (rust-lang/cargo#14160) - test: migrate package* and publish* to snapbox (rust-lang/cargo#14130) - More `update --breaking` tests (rust-lang/cargo#14049) - test: migrate clean to snapbox (rust-lang/cargo#14096) - Allow `unexpected_builtin_cfgs` lint in `user_specific_cfgs` test (rust-lang/cargo#14153) - test: migrate search, source_replacement and standard_lib to snapbox (rust-lang/cargo#14151) - Docs: Update config summary to include missing keys. (rust-lang/cargo#14145) - test: migrate `dep_info/diagnostics/direct_minimal_versions` to snapbox (rust-lang/cargo#14143) - Docs: Remove duplicate `strip` section. (rust-lang/cargo#14146) - Docs: Fix curly quotes in config docs. (rust-lang/cargo#14144)
What does this PR try to resolve?
Part of #14039.
Migrate following to snapbox:
tests/testsuite/fix.rstests/testsuite/fix_n_times.rstests/testsuite/future_incompat_report.rs