Skip to content

Commit

Permalink
Make the empty rustc-wrapper test more explicit.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jul 24, 2022
1 parent ba5b192 commit 8a487ab
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/testsuite/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,18 @@ fn check_keep_going() {

#[cargo_test]
fn does_not_use_empty_rustc_wrapper() {
let p = project().file("src/lib.rs", "").build();
// An empty RUSTC_WRAPPER environment variable won't be used.
// The env var will also override the config, essentially unsetting it.
let p = project()
.file("src/lib.rs", "")
.file(
".cargo/config.toml",
r#"
[build]
rustc-wrapper = "do-not-execute-me"
"#,
)
.build();
p.cargo("check").env("RUSTC_WRAPPER", "").run();
}

Expand Down

0 comments on commit 8a487ab

Please sign in to comment.