Skip to content

Commit da0dfd3

Browse files
committed
test: Verify cargo check does not output files to artifact-dir
1 parent 2ba6f8c commit da0dfd3

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/testsuite/check.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,3 +1684,28 @@ fn pkgid_querystring_works() {
16841684
"#]])
16851685
.run();
16861686
}
1687+
1688+
#[cargo_test]
1689+
fn check_build_should_not_output_files_to_artifact_dir() {
1690+
let p = project()
1691+
.file("src/main.rs", r#"fn main() { println!("Hello, World!") }"#)
1692+
.file(
1693+
".cargo/config.toml",
1694+
r#"
1695+
[build]
1696+
target-dir = "target-dir"
1697+
build-dir = "build-dir"
1698+
"#,
1699+
)
1700+
.build();
1701+
1702+
p.cargo("check").enable_mac_dsym().run();
1703+
1704+
p.root()
1705+
.join("target-dir")
1706+
.assert_build_dir_layout(str![[r#"
1707+
[ROOT]/foo/target-dir/CACHEDIR.TAG
1708+
[ROOT]/foo/target-dir/debug/.cargo-lock
1709+
1710+
"#]]);
1711+
}

0 commit comments

Comments
 (0)