The `with_stderr_contains()` (as well as the new `with_stderr_data()` too, see #14060) has no effect when using with `run_expect_error()`.
This commit is contained in:
Lawrence Chou 2024-06-14 00:06:59 +08:00
parent ea16f96033
commit afe9d17258
No known key found for this signature in database
GPG Key ID: 56B65EC9D482438D
2 changed files with 6 additions and 1 deletions

View File

@ -632,7 +632,9 @@ fn config_invalid_empty() {
.build();
p.cargo("check")
.with_stderr_contains("[..]missing field `level`[..]")
.with_stderr_contains(
"[..]missing field `level`[..] THIS RANDOM SENTENCE SHOULD FAIL THIS TEST BUT DIDN'T",
)
.run_expect_error();
}

View File

@ -2936,6 +2936,9 @@ fn use_mtime_cache_in_cargo_home() {
.with_stderr(
"\
[DIRTY] foo v0.5.0 ([CWD]): [..]
THIS RANDOM SENTENCE SHOULD FAIL THIS TEST BUT DIDN'T
[CHECKING] foo v0.5.0 ([CWD])
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]",
)