Skip to content

Commit

Permalink
test(publish): Add more dev-dep stripping regression cases
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jul 31, 2024
1 parent 3eb2986 commit 68147de
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion tests/testsuite/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1603,6 +1603,12 @@ fn publish_dev_dep_stripping() {
Package::new("normal-only", "1.0.0")
.feature("cat", &[])
.publish();
Package::new("optional-dep-feature", "1.0.0")
.feature("cat", &[])
.publish();
Package::new("optional-namespaced", "1.0.0")
.feature("cat", &[])
.publish();
Package::new("build-only", "1.0.0")
.feature("cat", &[])
.publish();
Expand Down Expand Up @@ -1644,11 +1650,15 @@ fn publish_dev_dep_stripping() {
"target-build-only/cat",
"target-dev-only/cat",
"target-normal-and-dev/cat",
"optional-dep-feature/cat",
"dep:optional-namespaced",
]
[dependencies]
normal-only = { version = "1.0", features = ["cat"] }
normal-and-dev = { version = "1.0", features = ["cat"] }
optional-dep-feature = { version = "1.0", features = ["cat"], optional = true }
optional-namespaced = { version = "1.0", features = ["cat"], optional = true }
[build-dependencies]
build-only = { version = "1.0", features = ["cat"] }
Expand Down Expand Up @@ -1738,6 +1748,28 @@ You may press ctrl-c to skip waiting; the crate should be available shortly.
"target": null,
"version_req": "^1.0"
},
{
"default_features": true,
"features": [
"cat"
],
"kind": "normal",
"name": "optional-dep-feature",
"optional": true,
"target": null,
"version_req": "^1.0"
},
{
"default_features": true,
"features": [
"cat"
],
"kind": "normal",
"name": "optional-namespaced",
"optional": true,
"target": null,
"version_req": "^1.0"
},
{
"default_features": true,
"features": [
Expand Down Expand Up @@ -1814,7 +1846,9 @@ You may press ctrl-c to skip waiting; the crate should be available shortly.
"normal-and-dev/cat",
"target-normal-only/cat",
"target-build-only/cat",
"target-normal-and-dev/cat"
"target-normal-and-dev/cat",
"optional-dep-feature/cat",
"dep:optional-namespaced"
]
},
"homepage": "foo",
Expand Down Expand Up @@ -1865,6 +1899,16 @@ features = ["cat"]
version = "1.0"
features = ["cat"]
[dependencies.optional-dep-feature]
version = "1.0"
features = ["cat"]
optional = true
[dependencies.optional-namespaced]
version = "1.0"
features = ["cat"]
optional = true
[dev-dependencies.normal-and-dev]
version = "1.0"
features = ["cat"]
Expand All @@ -1881,6 +1925,8 @@ foo_feature = [
"target-normal-only/cat",
"target-build-only/cat",
"target-normal-and-dev/cat",
"optional-dep-feature/cat",
"dep:optional-namespaced",
]
[target."cfg(unix)".dependencies.target-normal-and-dev]
Expand Down

0 comments on commit 68147de

Please sign in to comment.