Skip to content

Commit

Permalink
fixup! test: migrate features2 to snapbox
Browse files Browse the repository at this point in the history
  • Loading branch information
eth3lbert committed Jun 21, 2024
1 parent c2301fa commit a50e0a1
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions tests/testsuite/features2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,7 @@ it is false
.exists());
}

#[allow(deprecated)]
#[cargo_test]
fn proc_macro_ws() {
// Checks for bug with proc-macro in a workspace with dependency (shouldn't panic).
Expand Down Expand Up @@ -1225,22 +1226,12 @@ fn proc_macro_ws() {
"#]])
.run();
// Selecting just foo will build without unification.
let expected = if cfg!(target_os = "macos") {
str![[r#"
...
[RUNNING] `rustc --crate-name foo --edition=2015 foo/src/lib.rs --error-format=json --json=[..] --crate-type lib --emit=[..] -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked --check-cfg[..] --check-cfg[..] -C metadata=[..] -C extra-filename=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps`
...
"#]]
} else {
str![[r#"
...
[RUNNING] `rustc --crate-name foo --edition=2015 foo/src/lib.rs --error-format=json --json=[..] --crate-type lib --emit=[..] -C embed-bitcode=no -C debuginfo=2 --check-cfg[..] --check-cfg[..] -C metadata=[..] -C extra-filename=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps`
...
"#]]
};
p.cargo("check -p foo -v")
// Make sure `foo` is built without feat1
.with_stderr_data(expected)
.with_stderr_line_without(
&["[RUNNING] `rustc --crate-name foo --edition=2015"],
&["--cfg[..]feat1"],
)
.run();
}

Expand Down

0 comments on commit a50e0a1

Please sign in to comment.