diff --git a/tests/testsuite/profile_custom.rs b/tests/testsuite/profile_custom.rs index cb5f1dbac..738468fbf 100644 --- a/tests/testsuite/profile_custom.rs +++ b/tests/testsuite/profile_custom.rs @@ -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()