-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:
update --breaking
now understands package@version.
- Loading branch information
1 parent
f80dbad
commit 0d59dfc
Showing
2 changed files
with
46 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2247,7 +2247,12 @@ fn update_breaking_spec_version() { | |
// Invalid spec | ||
p.cargo("update -Zunstable-options --breaking incompatible@foo") | ||
.masquerade_as_nightly_cargo(&["update-breaking"]) | ||
.with_stderr("") | ||
.with_status(101) | ||
.with_stderr( | ||
"\ | ||
[ERROR] expected a version like \"1.32\" | ||
", | ||
) | ||
.run(); | ||
|
||
// Spec version not matching our current dependencies | ||
|
@@ -2265,20 +2270,38 @@ fn update_breaking_spec_version() { | |
// Accepted spec | ||
p.cargo("update -Zunstable-options --breaking [email protected]") | ||
.masquerade_as_nightly_cargo(&["update-breaking"]) | ||
.with_stderr("") | ||
.with_stderr( | ||
"\ | ||
[UPDATING] `[..]` index | ||
[UPGRADING] incompatible ^1.0 -> ^2.0 | ||
[LOCKING] 1 package to latest compatible version | ||
[UPDATING] incompatible v1.0.0 -> v2.0.0 | ||
", | ||
) | ||
.run(); | ||
|
||
// Accepted spec, full format | ||
Package::new("incompatible", "3.0.0").publish(); | ||
p.cargo("update -Zunstable-options --breaking https://github.com/rust-lang/crates.io-index#[email protected]") | ||
.masquerade_as_nightly_cargo(&["update-breaking"]) | ||
.with_stderr("") | ||
.with_stderr( | ||
"\ | ||
[UPDATING] `[..]` index | ||
[UPGRADING] incompatible ^2.0 -> ^3.0 | ||
[LOCKING] 1 package to latest compatible version | ||
[UPDATING] incompatible v2.0.0 -> v3.0.0 | ||
", | ||
) | ||
.run(); | ||
|
||
// Spec matches a dependency that will not be upgraded | ||
p.cargo("update -Zunstable-options --breaking [email protected]") | ||
.masquerade_as_nightly_cargo(&["update-breaking"]) | ||
.with_stderr("") | ||
.with_stderr( | ||
"\ | ||
[UPDATING] `[..]` index | ||
", | ||
) | ||
.run(); | ||
|
||
// Non-existing versions | ||
|