mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +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};
|
||||
|
||||
#[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]
|
||||
fn missing_inherits() {
|
||||
let p = project()
|
||||
|
Loading…
x
Reference in New Issue
Block a user