Skip to content

Commit e4345b2

Browse files
committed
Validate uploaded Cargo.toml contents.
1 parent d709c10 commit e4345b2

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/testsuite/publish.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ fn publish_dev_dep_no_version() {
12171217
)
12181218
.run();
12191219

1220-
publish::validate_upload(
1220+
publish::validate_upload_with_contents(
12211221
r#"
12221222
{
12231223
"authors": [],
@@ -1241,5 +1241,21 @@ fn publish_dev_dep_no_version() {
12411241
"#,
12421242
"foo-0.1.0.crate",
12431243
&["Cargo.toml", "Cargo.toml.orig", "src/lib.rs"],
1244+
&[(
1245+
"Cargo.toml",
1246+
r#"[..]
1247+
[package]
1248+
name = "foo"
1249+
version = "0.1.0"
1250+
authors = []
1251+
description = "foo"
1252+
homepage = "foo"
1253+
documentation = "foo"
1254+
license = "MIT"
1255+
repository = "foo"
1256+
1257+
[dev-dependencies]
1258+
"#,
1259+
)],
12441260
);
12451261
}

0 commit comments

Comments
 (0)