Skip to content

Commit 2eaf66b

Browse files
committed
test: migrate timings_works to snapbox
1 parent 5586a47 commit 2eaf66b

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

tests/testsuite/timings.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//! Tests for --timings.
22
3-
#![allow(deprecated)]
4-
53
use cargo_test_support::project;
64
use cargo_test_support::registry::Package;
5+
use cargo_test_support::str;
76

87
#[cargo_test]
98
fn timings_works() {
@@ -29,18 +28,17 @@ fn timings_works() {
2928
.build();
3029

3130
p.cargo("build --all-targets --timings")
32-
.with_stderr_unordered(
33-
"\
34-
[UPDATING] [..]
31+
.with_stderr_data(str![[r#"
32+
[UPDATING] `dummy-registry` index
3533
[LOCKING] 2 packages to latest compatible versions
3634
[DOWNLOADING] crates ...
37-
[DOWNLOADED] dep v0.1.0 [..]
35+
[DOWNLOADED] dep v0.1.0 (registry `dummy-registry`)
3836
[COMPILING] dep v0.1.0
39-
[COMPILING] foo v0.1.0 [..]
40-
[FINISHED] [..]
41-
Timing report saved to [..]/foo/target/cargo-timings/cargo-timing-[..].html
42-
",
43-
)
37+
[COMPILING] foo v0.1.0 ([ROOT]/foo)
38+
Timing report saved to [ROOT]/foo/target/cargo-timings/cargo-timing-[..].html
39+
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
40+
41+
"#]])
4442
.run();
4543

4644
p.cargo("clean").run();

0 commit comments

Comments
 (0)