mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
test(lints): Verify dependency behavior
This commit is contained in:
parent
12bc06aaf2
commit
3cba0c1b52
@ -69,6 +69,52 @@ switch to nightly channel you can add
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn dependency_warning_ignored() {
|
||||
let foo = project()
|
||||
.file(
|
||||
"Cargo.toml",
|
||||
r#"
|
||||
[package]
|
||||
name = "foo"
|
||||
version = "0.0.1"
|
||||
authors = []
|
||||
|
||||
[dependencies]
|
||||
bar.path = "../bar"
|
||||
"#,
|
||||
)
|
||||
.file("src/lib.rs", "")
|
||||
.build();
|
||||
|
||||
let _bar = project()
|
||||
.at("bar")
|
||||
.file(
|
||||
"Cargo.toml",
|
||||
r#"
|
||||
[package]
|
||||
name = "bar"
|
||||
version = "0.0.1"
|
||||
authors = []
|
||||
|
||||
[lints.rust]
|
||||
unsafe_code = "forbid"
|
||||
"#,
|
||||
)
|
||||
.file("src/lib.rs", "")
|
||||
.build();
|
||||
|
||||
foo.cargo("check")
|
||||
.with_stderr(
|
||||
"\
|
||||
[CHECKING] [..]
|
||||
[CHECKING] [..]
|
||||
[FINISHED] [..]
|
||||
",
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn malformed_on_stable() {
|
||||
let foo = project()
|
||||
|
Loading…
x
Reference in New Issue
Block a user