Skip to content

Commit

Permalink
Test simplifications
Browse files Browse the repository at this point in the history
  • Loading branch information
jneem committed May 29, 2024
1 parent 0bb063a commit 3b2e255
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/testsuite/registry_overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ fn simple_project() -> Project {
authors = []
[dependencies]
bar = ">= 0.0.0"
baz = ">= 0.1.0"
baz = "0.1.0"
"#,
)
.file("src/main.rs", "fn main() {}")
Expand All @@ -41,7 +40,6 @@ fn overlay_hit() {
let (reg, alt_path) = setup();
let p = simple_project();

Package::new("bar", "0.0.1").publish();
// baz is only in the local registry, but it gets found
Package::new("baz", "0.1.1")
.alternative(true)
Expand All @@ -58,7 +56,6 @@ fn version_fallback() {
let (reg, alt_path) = setup();
let p = simple_project();

Package::new("bar", "0.0.1").publish();
// The one we want is in the main registry.
Package::new("baz", "0.1.1").publish();
// An older version in the local registry doesn't confuse it.
Expand All @@ -77,7 +74,6 @@ fn version_collision() {
let (reg, alt_path) = setup();
let p = simple_project();

Package::new("bar", "0.0.1").publish();
// The one we want is in the main registry.
Package::new("baz", "0.1.1").publish();
Package::new("baz", "0.1.1")
Expand Down Expand Up @@ -107,7 +103,6 @@ fn multiversion() {
let (reg, alt_path) = setup();
let p = simple_project();

Package::new("bar", "0.0.1").publish();
Package::new("baz", "0.1.1").dep("baz", "=0.0.1").publish();
Package::new("baz", "0.0.1")
.alternative(true)
Expand Down Expand Up @@ -145,13 +140,13 @@ fn alt_registry() {
authors = []
[dependencies]
bar = { version = ">= 0.0.0", registry = "alternative" }
baz = { version = ">= 0.1.0", registry = "alternative" }
baz = { version = "0.1.0", registry = "alternative" }
"#,
)
.file("src/main.rs", "fn main() {}")
.build();

// This package isn't used, but publishing it forces the creation of the registry index.
Package::new("bar", "0.0.1").local(true).publish();
Package::new("baz", "0.1.1").alternative(true).publish();

Expand Down

0 comments on commit 3b2e255

Please sign in to comment.