|
19 | 19 | //! Otherwise the tests are skipped. |
20 | 20 |
|
21 | 21 | #![allow(clippy::disallowed_methods)] |
22 | | -#![allow(deprecated)] |
23 | 22 |
|
| 23 | +use cargo_test_support::prelude::*; |
24 | 24 | use cargo_test_support::*; |
25 | 25 | use std::env; |
26 | 26 | use std::path::Path; |
@@ -113,10 +113,11 @@ fn basic() { |
113 | 113 | .target_host() |
114 | 114 | // Importantly, this should not say [UPDATING] |
115 | 115 | // 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 | | - ) |
| 116 | + .with_stderr_data(str![[r#" |
| 117 | +[COMPILING] foo v0.0.1 ([ROOT]/foo) |
| 118 | +[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s |
| 119 | +
|
| 120 | +"#]]) |
120 | 121 | .run(); |
121 | 122 | p.cargo("run").build_std().target_host().run(); |
122 | 123 | p.cargo("test").build_std().target_host().run(); |
@@ -261,15 +262,18 @@ fn remap_path_scope() { |
261 | 262 | .build_std() |
262 | 263 | .target_host() |
263 | 264 | .with_status(101) |
264 | | - .with_stderr_contains( |
265 | | - "\ |
266 | | -[FINISHED] `release` profile [optimized + debuginfo] [..] |
267 | | -[RUNNING] [..] |
268 | | -[..]thread '[..]' panicked at [..]src/main.rs:3:[..]", |
| 265 | + .with_stderr_data( |
| 266 | + str![[r#" |
| 267 | +[FINISHED] `release` profile [optimized + debuginfo] target(s) in [ELAPSED]s |
| 268 | +[RUNNING] `target/[HOST_TARGET]/release/foo` |
| 269 | +[..]thread '[..]' panicked at [..]src/main.rs:3:[..]: |
| 270 | +remap to /rustc/<hash> |
| 271 | + at /rustc/[..]/library/std/src/[..] |
| 272 | + at ./src/main.rs:3:[..] |
| 273 | + at /rustc/[..]/library/core/src/[..] |
| 274 | +... |
| 275 | +"#]] |
| 276 | + .unordered(), |
269 | 277 | ) |
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/[..]") |
274 | 278 | .run(); |
275 | 279 | } |
0 commit comments