Skip to content

Commit 258db04

Browse files
committed
test(package): Show behavior with capitalized member
1 parent fcaf596 commit 258db04

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

tests/testsuite/package.rs

+68
Original file line numberDiff line numberDiff line change
@@ -6430,6 +6430,74 @@ fn workspace_with_local_and_remote_deps() {
64306430
.run();
64316431
}
64326432

6433+
#[cargo_test]
6434+
fn workspace_with_capitalized_member() {
6435+
let reg = registry::init();
6436+
6437+
let p = project()
6438+
.file(
6439+
"Cargo.toml",
6440+
r#"
6441+
[workspace]
6442+
members = ["dep", "main"]
6443+
"#,
6444+
)
6445+
.file(
6446+
"main/Cargo.toml",
6447+
r#"
6448+
[package]
6449+
name = "main"
6450+
version = "0.0.1"
6451+
edition = "2015"
6452+
authors = []
6453+
license = "MIT"
6454+
description = "main"
6455+
repository = "bar"
6456+
6457+
[dependencies]
6458+
DEP = { path = "../dep", version = "0.1.0" }
6459+
"#,
6460+
)
6461+
.file("main/src/main.rs", "fn main() {}")
6462+
.file(
6463+
"dep/Cargo.toml",
6464+
r#"
6465+
[package]
6466+
name = "DEP"
6467+
version = "0.1.0"
6468+
edition = "2015"
6469+
authors = []
6470+
license = "MIT"
6471+
description = "dep"
6472+
repository = "bar"
6473+
"#,
6474+
)
6475+
.file("dep/src/lib.rs", "")
6476+
.build();
6477+
6478+
p.cargo("package -Zpackage-workspace --no-verify")
6479+
.masquerade_as_nightly_cargo(&["package-workspace"])
6480+
.replace_crates_io(reg.index_url())
6481+
.with_status(101)
6482+
.with_stderr_data(
6483+
str![[r#"
6484+
[PACKAGING] main v0.0.1 ([ROOT]/foo/main)
6485+
[UPDATING] crates.io index
6486+
[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
6487+
[PACKAGING] DEP v0.1.0 ([ROOT]/foo/dep)
6488+
[ERROR] failed to prepare local package for uploading
6489+
6490+
Caused by:
6491+
no matching package named `DEP` found
6492+
location searched: crates.io index
6493+
required by package `main v0.0.1 ([ROOT]/foo/main)`
6494+
6495+
"#]]
6496+
.unordered(),
6497+
)
6498+
.run();
6499+
}
6500+
64336501
#[cargo_test]
64346502
fn registry_not_in_publish_list() {
64356503
let p = project()

0 commit comments

Comments
 (0)