diff --git a/tests/testsuite/publish.rs b/tests/testsuite/publish.rs index badfef3a2162..c642764c1afd 100644 --- a/tests/testsuite/publish.rs +++ b/tests/testsuite/publish.rs @@ -1609,6 +1609,12 @@ fn publish_dev_dep_stripping() { Package::new("optional-namespaced", "1.0.0") .feature("cat", &[]) .publish(); + Package::new("optional-renamed-dep-feature", "1.0.0") + .feature("cat", &[]) + .publish(); + Package::new("optional-renamed-namespaced", "1.0.0") + .feature("cat", &[]) + .publish(); Package::new("build-only", "1.0.0") .feature("cat", &[]) .publish(); @@ -1653,6 +1659,8 @@ fn publish_dev_dep_stripping() { "target-normal-and-dev/cat", "optional-dep-feature/cat", "dep:optional-namespaced", + "dep:optional-renamed-dep-feature10", + "dep:optional-renamed-namespaced10", ] [dependencies] @@ -1660,6 +1668,8 @@ fn publish_dev_dep_stripping() { 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 } + optional-renamed-dep-feature10 = { version = "1.0", features = ["cat"], optional = true, package = "optional-renamed-dep-feature" } + optional-renamed-namespaced10 = { version = "1.0", features = ["cat"], optional = true, package = "optional-renamed-namespaced" } [build-dependencies] build-only = { version = "1.0", features = ["cat"] } @@ -1792,6 +1802,30 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. "target": null, "version_req": "^1.0" }, + { + "default_features": true, + "explicit_name_in_toml": "optional-renamed-dep-feature10", + "features": [ + "cat" + ], + "kind": "normal", + "name": "optional-renamed-dep-feature", + "optional": true, + "target": null, + "version_req": "^1.0" + }, + { + "default_features": true, + "explicit_name_in_toml": "optional-renamed-namespaced10", + "features": [ + "cat" + ], + "kind": "normal", + "name": "optional-renamed-namespaced", + "optional": true, + "target": null, + "version_req": "^1.0" + }, { "default_features": true, "features": [ @@ -1931,6 +1965,18 @@ version = "1.0" features = ["cat"] optional = true +[dependencies.optional-renamed-dep-feature10] +version = "1.0" +features = ["cat"] +optional = true +package = "optional-renamed-dep-feature" + +[dependencies.optional-renamed-namespaced10] +version = "1.0" +features = ["cat"] +optional = true +package = "optional-renamed-namespaced" + [dev-dependencies.normal-and-dev] version = "1.0" features = ["cat"] @@ -1949,6 +1995,8 @@ foo_feature = [ "target-normal-and-dev/cat", "optional-dep-feature/cat", "dep:optional-namespaced", + "dep:optional-renamed-dep-feature10", + "dep:optional-renamed-namespaced10", ] [target."cfg(unix)".dependencies.target-normal-and-dev]