mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
tests: profile_custom - test for invalid 'inherits' use on root profile
This commit is contained in:
parent
a2b719762d
commit
6cd8e87dea
@ -1,5 +1,39 @@
|
|||||||
use cargo_test_support::{basic_lib_manifest, project};
|
use cargo_test_support::{basic_lib_manifest, project};
|
||||||
|
|
||||||
|
#[cargo_test]
|
||||||
|
fn inherits_on_release() {
|
||||||
|
let p = project()
|
||||||
|
.file(
|
||||||
|
"Cargo.toml",
|
||||||
|
r#"
|
||||||
|
cargo-features = ["named-profiles"]
|
||||||
|
|
||||||
|
[package]
|
||||||
|
name = "foo"
|
||||||
|
version = "0.0.1"
|
||||||
|
authors = []
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
inherits = "dev"
|
||||||
|
"#,
|
||||||
|
)
|
||||||
|
.file("src/lib.rs", "")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
p.cargo("build")
|
||||||
|
.masquerade_as_nightly_cargo()
|
||||||
|
.with_status(101)
|
||||||
|
.with_stderr(
|
||||||
|
"\
|
||||||
|
[ERROR] failed to parse manifest at [..]
|
||||||
|
|
||||||
|
Caused by:
|
||||||
|
An 'inherits' must not specified root profile 'release'
|
||||||
|
"
|
||||||
|
)
|
||||||
|
.run();
|
||||||
|
}
|
||||||
|
|
||||||
#[cargo_test]
|
#[cargo_test]
|
||||||
fn missing_inherits() {
|
fn missing_inherits() {
|
||||||
let p = project()
|
let p = project()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user