Skip to content

Commit

Permalink
test(lints): Verify dependency behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed May 22, 2023
1 parent 0407a7f commit ccf5c64
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions tests/testsuite/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ccf5c64

Please sign in to comment.