Skip to content

Commit f01fb3b

Browse files
committed
test: Adjust update-breaking tests.
1 parent de1a4a2 commit f01fb3b

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

tests/testsuite/update.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ fn change_package_version() {
362362
}
363363

364364
#[cargo_test]
365-
fn update_precise() {
365+
fn update_precise_downgrade() {
366366
Package::new("serde", "0.1.0").publish();
367367
Package::new("serde", "0.2.1").publish();
368368

@@ -1411,7 +1411,7 @@ fn update_precise_git_revisions() {
14111411
}
14121412

14131413
#[cargo_test]
1414-
fn precise_yanked() {
1414+
fn update_precise_yanked() {
14151415
Package::new("bar", "0.1.0").publish();
14161416
Package::new("bar", "0.1.1").yanked(true).publish();
14171417
let p = project()
@@ -1450,7 +1450,7 @@ fn precise_yanked() {
14501450
}
14511451

14521452
#[cargo_test]
1453-
fn precise_yanked_multiple_presence() {
1453+
fn update_precise_yanked_multiple_presence() {
14541454
Package::new("bar", "0.1.0").publish();
14551455
Package::new("bar", "0.1.1").yanked(true).publish();
14561456
let p = project()
@@ -2162,7 +2162,7 @@ fn update_breaking_specific_packages_that_wont_update() {
21622162
p.cargo("update -Zunstable-options --breaking compatible renamed-from non-semver transitive-compatible transitive-incompatible")
21632163
.masquerade_as_nightly_cargo(&["update-breaking"])
21642164
.with_stderr_data(str![[r#"
2165-
[UPDATING] `[..]` index
2165+
[UPDATING] `dummy-registry` index
21662166
21672167
"#]])
21682168
.run();
@@ -2177,7 +2177,7 @@ fn update_breaking_specific_packages_that_wont_update() {
21772177
"update compatible renamed-from non-semver transitive-compatible transitive-incompatible",
21782178
)
21792179
.with_stderr_data(str![[r#"
2180-
[UPDATING] `[..]` index
2180+
[UPDATING] `dummy-registry` index
21812181
[LOCKING] 5 packages to latest compatible versions
21822182
[UPDATING] compatible v1.0.0 -> v1.0.1
21832183
[UPDATING] non-semver v1.0.0 -> v1.0.1 (latest: v2.0.0)
@@ -2220,7 +2220,7 @@ fn update_breaking_without_lock_file() {
22202220
p.cargo("update -Zunstable-options --breaking")
22212221
.masquerade_as_nightly_cargo(&["update-breaking"])
22222222
.with_stderr_data(str![[r#"
2223-
[UPDATING] `[..]` index
2223+
[UPDATING] `dummy-registry` index
22242224
[UPGRADING] incompatible ^1.0 -> ^2.0
22252225
[LOCKING] 3 packages to latest compatible versions
22262226
@@ -2284,7 +2284,7 @@ fn update_breaking_spec_version() {
22842284
p.cargo("update -Zunstable-options --breaking [email protected]")
22852285
.masquerade_as_nightly_cargo(&["update-breaking"])
22862286
.with_stderr_data(str![[r#"
2287-
[UPDATING] `[..]` index
2287+
[UPDATING] `dummy-registry` index
22882288
[UPGRADING] incompatible ^1.0 -> ^2.0
22892289
[LOCKING] 1 package to latest compatible version
22902290
[UPDATING] incompatible v1.0.0 -> v2.0.0
@@ -2297,7 +2297,7 @@ fn update_breaking_spec_version() {
22972297
p.cargo("update -Zunstable-options --breaking https://github.com/rust-lang/crates.io-index#[email protected]")
22982298
.masquerade_as_nightly_cargo(&["update-breaking"])
22992299
.with_stderr_data(str![[r#"
2300-
[UPDATING] `[..]` index
2300+
[UPDATING] `dummy-registry` index
23012301
[UPGRADING] incompatible ^2.0 -> ^3.0
23022302
[LOCKING] 1 package to latest compatible version
23032303
[UPDATING] incompatible v2.0.0 -> v3.0.0
@@ -2309,7 +2309,7 @@ fn update_breaking_spec_version() {
23092309
p.cargo("update -Zunstable-options --breaking [email protected]")
23102310
.masquerade_as_nightly_cargo(&["update-breaking"])
23112311
.with_stderr_data(str![[r#"
2312-
[UPDATING] `[..]` index
2312+
[UPDATING] `dummy-registry` index
23132313
23142314
"#]])
23152315
.run();
@@ -2329,7 +2329,7 @@ fn update_breaking_spec_version() {
23292329
#[cargo_test]
23302330
fn update_breaking_spec_version_transitive() {
23312331
Package::new("dep", "1.0.0").publish();
2332-
Package::new("dep", "1.1.0").publish();
2332+
Package::new("dep", "2.0.0").publish();
23332333

23342334
let p = project()
23352335
.file(
@@ -2357,44 +2357,44 @@ fn update_breaking_spec_version_transitive() {
23572357
authors = []
23582358
23592359
[dependencies]
2360-
dep = "1.1"
2360+
dep = "2.0"
23612361
"#,
23622362
)
23632363
.file("bar/src/lib.rs", "")
23642364
.build();
23652365

23662366
p.cargo("generate-lockfile").run();
23672367

2368-
Package::new("dep", "1.1.1").publish();
2369-
Package::new("dep", "2.0.0").publish();
2368+
Package::new("dep", "2.0.1").publish();
2369+
Package::new("dep", "3.0.0").publish();
23702370

23712371
// Will upgrade the direct dependency
23722372
p.cargo("update -Zunstable-options --breaking [email protected]")
23732373
.masquerade_as_nightly_cargo(&["update-breaking"])
23742374
.with_stderr_data(str![[r#"
2375-
[UPDATING] `[..]` index
2376-
[UPGRADING] dep ^1.0 -> ^2.0
2375+
[UPDATING] `dummy-registry` index
2376+
[UPGRADING] dep ^1.0 -> ^3.0
23772377
[LOCKING] 1 package to latest compatible version
2378-
[ADDING] dep v2.0.0
2378+
[UPDATING] dep v1.0.0 -> v3.0.0
23792379
23802380
"#]])
23812381
.run();
23822382

23832383
// But not the transitive one, because bar is not a workspace member
2384-
p.cargo("update -Zunstable-options --breaking dep@1.1")
2384+
p.cargo("update -Zunstable-options --breaking dep@2.0")
23852385
.masquerade_as_nightly_cargo(&["update-breaking"])
23862386
.with_stderr_data(str![[r#"
2387-
[UPDATING] `[..]` index
2387+
[UPDATING] `dummy-registry` index
23882388
23892389
"#]])
23902390
.run();
23912391

23922392
// A non-breaking update is different, as it will update transitive dependencies
2393-
p.cargo("update dep@1.1")
2393+
p.cargo("update dep@2.0")
23942394
.with_stderr_data(str![[r#"
2395-
[UPDATING] `[..]` index
2395+
[UPDATING] `dummy-registry` index
23962396
[LOCKING] 1 package to latest compatible version
2397-
[UPDATING] dep v1.1.0 -> v1.1.1 (latest: v2.0.0)
2397+
[UPDATING] dep v2.0.0 -> v2.0.1 (latest: v3.0.0)
23982398
23992399
"#]])
24002400
.run();
@@ -2450,7 +2450,7 @@ fn update_breaking_mixed_compatibility() {
24502450
p.cargo("update -Zunstable-options --breaking")
24512451
.masquerade_as_nightly_cargo(&["update-breaking"])
24522452
.with_stderr_data(str![[r#"
2453-
[UPDATING] `[..]` index
2453+
[UPDATING] `dummy-registry` index
24542454
[UPGRADING] mixed-compatibility ^1.0 -> ^2.0
24552455
[LOCKING] 1 package to latest compatible version
24562456
[ADDING] mixed-compatibility v2.0.1
@@ -2536,7 +2536,7 @@ fn update_breaking_mixed_pinning_renaming() {
25362536
p.cargo("update -Zunstable-options --breaking")
25372537
.masquerade_as_nightly_cargo(&["update-breaking"])
25382538
.with_stderr_data(str![[r#"
2539-
[UPDATING] `[..]` index
2539+
[UPDATING] `dummy-registry` index
25402540
[UPGRADING] mixed-pinned ^1.0 -> ^2.0
25412541
[UPGRADING] mixed-ws-pinned ^1.0 -> ^2.0
25422542
[UPGRADING] renamed-from ^1.0 -> ^2.0

0 commit comments

Comments
 (0)