mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
test(toml): Verify missing package.name
This commit is contained in:
parent
fcb79a5c45
commit
5f529f792d
@ -470,6 +470,31 @@ expected `}`
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn cargo_toml_missing_package_name() {
|
||||
let p = project()
|
||||
.file(
|
||||
"Cargo.toml",
|
||||
r#"
|
||||
[package]
|
||||
"#,
|
||||
)
|
||||
.build();
|
||||
|
||||
p.cargo("check")
|
||||
.with_status(101)
|
||||
.with_stderr_data(str![[r#"
|
||||
[ERROR] missing field `name`
|
||||
--> Cargo.toml:2:16
|
||||
|
|
||||
2 | [package]
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
|
||||
"#]])
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn duplicate_binary_names() {
|
||||
let p = project()
|
||||
|
Loading…
x
Reference in New Issue
Block a user