Skip to content

Commit

Permalink
test: use with_stderr_data when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Nov 9, 2024
1 parent 33f4367 commit 1933a78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testsuite/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3900,7 +3900,7 @@ fn cargo_test_env() {
.replace(rustc_host, "[HOST_TARGET]")
);
p.cargo("test --lib -- --nocapture")
.with_stderr_contains(cargo)
.with_stderr_data(format!("...\n{cargo}\n..."))
.with_stdout_data(str![[r#"
...
test env_test ... ok
Expand All @@ -3924,7 +3924,7 @@ test env_test ... ok
p.cargo("test --lib -- --nocapture")
// we use rustc since $CARGO is only used if it points to a path that exists
.env(cargo::CARGO_ENV, rustc)
.with_stderr_contains(stderr_rustc)
.with_stderr_data(format!("...\n{stderr_rustc}\n..."))
.with_stdout_data(str![[r#"
...
test env_test ... ok
Expand Down

0 comments on commit 1933a78

Please sign in to comment.