Skip to content

Commit 37790cd

Browse files
committed
test: migrate build-std/main to snapbox
1 parent 0e2ef80 commit 37790cd

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

tests/build-std/main.rs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
//! Otherwise the tests are skipped.
2020
2121
#![allow(clippy::disallowed_methods)]
22-
#![allow(deprecated)]
2322

2423
use cargo_test_support::*;
2524
use std::env;
@@ -113,10 +112,11 @@ fn basic() {
113112
.target_host()
114113
// Importantly, this should not say [UPDATING]
115114
// There have been multiple bugs where every build triggers and update.
116-
.with_stderr(
117-
"[COMPILING] foo v0.0.1 [..]\n\
118-
[FINISHED] `dev` profile [..]",
119-
)
115+
.with_stderr_data(str![[r#"
116+
[COMPILING] foo v0.0.1 ([ROOT]/foo)
117+
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
118+
119+
"#]])
120120
.run();
121121
p.cargo("run").build_std().target_host().run();
122122
p.cargo("test").build_std().target_host().run();
@@ -261,15 +261,6 @@ fn remap_path_scope() {
261261
.build_std()
262262
.target_host()
263263
.with_status(101)
264-
.with_stderr_contains(
265-
"\
266-
[FINISHED] `release` profile [optimized + debuginfo] [..]
267-
[RUNNING] [..]
268-
[..]thread '[..]' panicked at [..]src/main.rs:3:[..]",
269-
)
270-
.with_stderr_contains("remap to /rustc/<hash>")
271-
.with_stderr_contains("[..]at /rustc/[..]/library/std/src/[..]")
272-
.with_stderr_contains("[..]at src/main.rs:3[..]")
273-
.with_stderr_contains("[..]at /rustc/[..]/library/core/src/[..]")
264+
.with_stderr_data(str![])
274265
.run();
275266
}

0 commit comments

Comments
 (0)