Skip to content

Commit afe9d17

Browse files
committed
Reproduce #14076
The `with_stderr_contains()` (as well as the new `with_stderr_data()` too, see #14060) has no effect when using with `run_expect_error()`.
1 parent ea16f96 commit afe9d17

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

tests/testsuite/check_cfg.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,9 @@ fn config_invalid_empty() {
632632
.build();
633633

634634
p.cargo("check")
635-
.with_stderr_contains("[..]missing field `level`[..]")
635+
.with_stderr_contains(
636+
"[..]missing field `level`[..] THIS RANDOM SENTENCE SHOULD FAIL THIS TEST BUT DIDN'T",
637+
)
636638
.run_expect_error();
637639
}
638640

tests/testsuite/freshness.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2936,6 +2936,9 @@ fn use_mtime_cache_in_cargo_home() {
29362936
.with_stderr(
29372937
"\
29382938
[DIRTY] foo v0.5.0 ([CWD]): [..]
2939+
2940+
THIS RANDOM SENTENCE SHOULD FAIL THIS TEST BUT DIDN'T
2941+
29392942
[CHECKING] foo v0.5.0 ([CWD])
29402943
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]",
29412944
)

0 commit comments

Comments
 (0)