mirror of
https://github.com/rust-lang/cargo
synced 2024-10-13 19:22:33 +00:00
0e0d968825
sed -i 's/^#\[test\]/#[cargo_test]/' $(rg -l '^#\[test\]') Manual fixes: * proc_macro::proc_macro_doctest
33 lines
750 B
Rust
33 lines
750 B
Rust
use crate::support::{basic_lib_manifest, project};
|
|
|
|
#[cargo_test]
|
|
fn edition_works_for_build_script() {
|
|
let p = project()
|
|
.file(
|
|
"Cargo.toml",
|
|
r#"
|
|
[package]
|
|
name = 'foo'
|
|
version = '0.1.0'
|
|
edition = '2018'
|
|
|
|
[build-dependencies]
|
|
a = { path = 'a' }
|
|
"#,
|
|
)
|
|
.file("src/lib.rs", "")
|
|
.file(
|
|
"build.rs",
|
|
r#"
|
|
fn main() {
|
|
a::foo();
|
|
}
|
|
"#,
|
|
)
|
|
.file("a/Cargo.toml", &basic_lib_manifest("a"))
|
|
.file("a/src/lib.rs", "pub fn foo() {}")
|
|
.build();
|
|
|
|
p.cargo("build -v").run();
|
|
}
|