Skip to content

Commit a50e0a1

Browse files
committed
fixup! test: migrate features2 to snapbox
1 parent c2301fa commit a50e0a1

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

tests/testsuite/features2.rs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,7 @@ it is false
11531153
.exists());
11541154
}
11551155

1156+
#[allow(deprecated)]
11561157
#[cargo_test]
11571158
fn proc_macro_ws() {
11581159
// Checks for bug with proc-macro in a workspace with dependency (shouldn't panic).
@@ -1225,22 +1226,12 @@ fn proc_macro_ws() {
12251226
"#]])
12261227
.run();
12271228
// Selecting just foo will build without unification.
1228-
let expected = if cfg!(target_os = "macos") {
1229-
str![[r#"
1230-
...
1231-
[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`
1232-
...
1233-
"#]]
1234-
} else {
1235-
str![[r#"
1236-
...
1237-
[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`
1238-
...
1239-
"#]]
1240-
};
12411229
p.cargo("check -p foo -v")
12421230
// Make sure `foo` is built without feat1
1243-
.with_stderr_data(expected)
1231+
.with_stderr_line_without(
1232+
&["[RUNNING] `rustc --crate-name foo --edition=2015"],
1233+
&["--cfg[..]feat1"],
1234+
)
12441235
.run();
12451236
}
12461237

0 commit comments

Comments
 (0)