mirror of
https://github.com/rust-lang/cargo
synced 2024-10-13 19:22:33 +00:00
test(lints): Show bug with lints on stable
This commit is contained in:
parent
a7555f976e
commit
66038fad36
|
@ -67,6 +67,70 @@ See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#lints for mo
|
|||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn malformed_on_stable() {
|
||||
let foo = project()
|
||||
.file(
|
||||
"Cargo.toml",
|
||||
r#"
|
||||
lints = 20
|
||||
[package]
|
||||
name = "foo"
|
||||
version = "0.0.1"
|
||||
authors = []
|
||||
|
||||
"#,
|
||||
)
|
||||
.file("src/lib.rs", "")
|
||||
.build();
|
||||
|
||||
foo.cargo("check")
|
||||
.with_status(101)
|
||||
.with_stderr(
|
||||
"\
|
||||
error: failed to parse manifest[..]
|
||||
|
||||
Caused by:
|
||||
invalid type: integer `20`, expected a map
|
||||
in `lints`
|
||||
",
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn malformed_on_nightly() {
|
||||
let foo = project()
|
||||
.file(
|
||||
"Cargo.toml",
|
||||
r#"
|
||||
cargo-features = ["lints"]
|
||||
lints = 20
|
||||
[package]
|
||||
name = "foo"
|
||||
version = "0.0.1"
|
||||
authors = []
|
||||
|
||||
"#,
|
||||
)
|
||||
.file("src/lib.rs", "")
|
||||
.build();
|
||||
|
||||
foo.cargo("check")
|
||||
.masquerade_as_nightly_cargo(&["lints"])
|
||||
.with_status(101)
|
||||
.with_stderr(
|
||||
"\
|
||||
error: failed to parse manifest[..]
|
||||
|
||||
Caused by:
|
||||
invalid type: integer `20`, expected a map
|
||||
in `lints`
|
||||
",
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn fail_on_invalid_tool() {
|
||||
let foo = project()
|
||||
|
|
Loading…
Reference in a new issue