mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Add regression test for #10206
This commit is contained in:
parent
040f0d10a6
commit
fb47df72e1
@ -1435,3 +1435,21 @@ fn remap_path_prefix_works() {
|
||||
.with_stdout("/foo/home/.cargo/registry/src/[..]/bar-0.1.0/src/lib.rs")
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn host_config_rustflags_with_target() {
|
||||
// regression test for https://github.com/rust-lang/cargo/issues/10206
|
||||
let p = project()
|
||||
.file("src/lib.rs", "")
|
||||
.file("build.rs.rs", "fn main() { assert!(cfg!(foo)); }")
|
||||
.build();
|
||||
|
||||
p.cargo("build")
|
||||
.masquerade_as_nightly_cargo()
|
||||
.arg("-Zhost-config")
|
||||
.arg("-Ztarget-applies-to-host=no")
|
||||
.arg("-Zunstable-options")
|
||||
.arg("--config")
|
||||
.arg("host.rustflags=[\"--cfg=foo\"]")
|
||||
.run();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user