Skip to content

Commit

Permalink
Reproduce rust-lang#14076
Browse files Browse the repository at this point in the history
The `with_stderr_contains()` (as well as the new `with_stderr_data()` too, see rust-lang#14060) has no effect when using with `run_expect_error()`.
  • Loading branch information
choznerol committed Jun 16, 2024
1 parent ea16f96 commit afe9d17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/testsuite/check_cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
3 changes: 3 additions & 0 deletions tests/testsuite/freshness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 [..]",
)
Expand Down

0 comments on commit afe9d17

Please sign in to comment.