Skip to content

Commit f05a896

Browse files
committed
test: migrate dep_info to snapbox
1 parent 7dcf764 commit f05a896

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

tests/testsuite/dep_info.rs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//! Tests for dep-info files. This includes the dep-info file Cargo creates in
22
//! the output directory, and the ones stored in the fingerprint.
33
4-
#![allow(deprecated)]
5-
64
use cargo_test_support::compare::assert_e2e;
75
use cargo_test_support::paths::{self, CargoPathExt};
86
use cargo_test_support::registry::Package;
@@ -323,7 +321,11 @@ fn relative_depinfo_paths_ws() {
323321
p.cargo("build -Z binary-dep-depinfo --target")
324322
.arg(&host)
325323
.masquerade_as_nightly_cargo(&["binary-dep-depinfo"])
326-
.with_stderr_contains("[COMPILING] foo [..]")
324+
.with_stderr_data(str![[r#"
325+
...
326+
[COMPILING] foo v0.1.0 ([ROOT]/foo/foo)
327+
...
328+
"#]])
327329
.run();
328330

329331
assert_deps_contains(
@@ -360,7 +362,10 @@ fn relative_depinfo_paths_ws() {
360362
p.cargo("build -Z binary-dep-depinfo --target")
361363
.arg(&host)
362364
.masquerade_as_nightly_cargo(&["binary-dep-depinfo"])
363-
.with_stderr("[FINISHED] `dev` profile [..]")
365+
.with_stderr_data(str![[r#"
366+
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
367+
368+
"#]])
364369
.run();
365370
}
366371

@@ -446,7 +451,11 @@ fn relative_depinfo_paths_no_ws() {
446451

447452
p.cargo("build -Z binary-dep-depinfo")
448453
.masquerade_as_nightly_cargo(&["binary-dep-depinfo"])
449-
.with_stderr_contains("[COMPILING] foo [..]")
454+
.with_stderr_data(str![[r#"
455+
...
456+
[COMPILING] foo v0.1.0 ([ROOT]/foo)
457+
...
458+
"#]])
450459
.run();
451460

452461
assert_deps_contains(
@@ -482,7 +491,10 @@ fn relative_depinfo_paths_no_ws() {
482491
// Make sure it stays fresh.
483492
p.cargo("build -Z binary-dep-depinfo")
484493
.masquerade_as_nightly_cargo(&["binary-dep-depinfo"])
485-
.with_stderr("[FINISHED] `dev` profile [..]")
494+
.with_stderr_data(str![[r#"
495+
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
496+
497+
"#]])
486498
.run();
487499
}
488500

0 commit comments

Comments
 (0)