Skip to content

Commit 2d46fe5

Browse files
committed
tests: update projects feature unification tests to use correct unificatin
1 parent a3c6ba9 commit 2d46fe5

File tree

1 file changed

+34
-8
lines changed

1 file changed

+34
-8
lines changed

tests/testsuite/feature_unification.rs

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fn projects_feature_unification() {
130130
".cargo/config.toml",
131131
r#"
132132
[resolver]
133-
feature-unification = "selected"
133+
feature-unification = "projects"
134134
"#,
135135
)
136136
.file(
@@ -239,14 +239,21 @@ fn projects_feature_unification() {
239239
p.cargo("check -p a -p b")
240240
.arg("-Zfeature-unification")
241241
.masquerade_as_nightly_cargo(&["feature-unification"])
242-
.with_status(101)
243-
.with_stderr_contains("[ERROR] features were unified")
242+
.with_stderr_data(
243+
str![[r#"
244+
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
245+
246+
"#]]
247+
.unordered(),
248+
)
244249
.run();
245250
p.cargo("check")
246251
.arg("-Zfeature-unification")
247252
.masquerade_as_nightly_cargo(&["feature-unification"])
248-
.with_status(101)
249-
.with_stderr_contains("[ERROR] features were unified")
253+
.with_stderr_data(str![[r#"
254+
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
255+
256+
"#]])
250257
.run();
251258
}
252259

@@ -257,7 +264,7 @@ fn projects_feature_unification_default_features() {
257264
".cargo/config.toml",
258265
r#"
259266
[resolver]
260-
feature-unification = "selected"
267+
feature-unification = "projects"
261268
"#,
262269
)
263270
.file(
@@ -352,8 +359,13 @@ fn projects_feature_unification_default_features() {
352359
p.cargo("check")
353360
.arg("-Zfeature-unification")
354361
.masquerade_as_nightly_cargo(&["feature-unification"])
355-
.with_status(101)
356-
.with_stderr_contains("[ERROR] features were unified")
362+
.with_stderr_data(
363+
str![[r#"
364+
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
365+
366+
"#]]
367+
.unordered(),
368+
)
357369
.run();
358370
}
359371

@@ -425,6 +437,20 @@ fn cargo_install_ignores_config() {
425437
[INSTALLED] package `a v0.1.0 ([ROOT]/foo)` (executable `a[EXE]`)
426438
[WARNING] be sure to add `[ROOT]/home/.cargo/bin` to your PATH to be able to run the installed binaries
427439
440+
"#]])
441+
.run();
442+
cargo_process("install --path")
443+
.arg(p.root())
444+
.arg("-Zfeature-unification")
445+
.masquerade_as_nightly_cargo(&["feature-unification"])
446+
.env("CARGO_RESOLVER_FEATURE_UNIFICATION", "projects")
447+
.with_stderr_data(str![[r#"
448+
[INSTALLING] a v0.1.0 ([ROOT]/foo)
449+
[FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s
450+
[REPLACING] [ROOT]/home/.cargo/bin/a
451+
[REPLACED] package `a v0.1.0 ([ROOT]/foo)` with `a v0.1.0 ([ROOT]/foo)` (executable `a`)
452+
[WARNING] be sure to add `[ROOT]/home/.cargo/bin` to your PATH to be able to run the installed binaries
453+
428454
"#]])
429455
.run();
430456
}

0 commit comments

Comments
 (0)