Skip to content

Commit 27c39b6

Browse files
committed
test(package): Show nightly self-dep behavior
1 parent c8d15a3 commit 27c39b6

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

tests/testsuite/package.rs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7560,6 +7560,40 @@ fn unpublished_cyclic_dev_dependencies() {
75607560
);
75617561
}
75627562

7563+
#[cargo_test]
7564+
fn unpublished_cyclic_dev_dependencies_nightly() {
7565+
registry::init();
7566+
let p = project()
7567+
.file(
7568+
"Cargo.toml",
7569+
r#"
7570+
[package]
7571+
name = "foo"
7572+
version = "0.0.1"
7573+
edition = "2015"
7574+
authors = []
7575+
license = "MIT"
7576+
description = "foo"
7577+
documentation = "foo"
7578+
7579+
[dev-dependencies]
7580+
foo = { path = ".", version = "0.0.1" }
7581+
"#,
7582+
)
7583+
.file("src/lib.rs", "")
7584+
.build();
7585+
7586+
p.cargo("package --no-verify --exclude-lockfile -Zpackage-workspace")
7587+
.masquerade_as_nightly_cargo(&["package-workspace"])
7588+
.with_status(101)
7589+
.with_stderr_data(str![[r#"
7590+
[ERROR] crates-io is replaced with remote registry dummy-registry;
7591+
include `--registry dummy-registry` or `--registry crates-io`
7592+
7593+
"#]])
7594+
.run();
7595+
}
7596+
75637597
// A failing case from <https://github.com/rust-lang/cargo/issues/15059>
75647598
#[cargo_test]
75657599
fn unpublished_dependency() {

0 commit comments

Comments
 (0)