@@ -362,7 +362,7 @@ fn change_package_version() {
362
362
}
363
363
364
364
#[ cargo_test]
365
- fn update_precise ( ) {
365
+ fn update_precise_downgrade ( ) {
366
366
Package :: new ( "serde" , "0.1.0" ) . publish ( ) ;
367
367
Package :: new ( "serde" , "0.2.1" ) . publish ( ) ;
368
368
@@ -1411,7 +1411,7 @@ fn update_precise_git_revisions() {
1411
1411
}
1412
1412
1413
1413
#[ cargo_test]
1414
- fn precise_yanked ( ) {
1414
+ fn update_precise_yanked ( ) {
1415
1415
Package :: new ( "bar" , "0.1.0" ) . publish ( ) ;
1416
1416
Package :: new ( "bar" , "0.1.1" ) . yanked ( true ) . publish ( ) ;
1417
1417
let p = project ( )
@@ -1450,7 +1450,7 @@ fn precise_yanked() {
1450
1450
}
1451
1451
1452
1452
#[ cargo_test]
1453
- fn precise_yanked_multiple_presence ( ) {
1453
+ fn update_precise_yanked_multiple_presence ( ) {
1454
1454
Package :: new ( "bar" , "0.1.0" ) . publish ( ) ;
1455
1455
Package :: new ( "bar" , "0.1.1" ) . yanked ( true ) . publish ( ) ;
1456
1456
let p = project ( )
@@ -1631,8 +1631,8 @@ fn update_breaking_unstable() {
1631
1631
. file ( "src/lib.rs" , "" )
1632
1632
. build ( ) ;
1633
1633
1634
- p. cargo ( "update --breaking" )
1635
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
1634
+ p. cargo ( "update --breaking" )
1635
+ . masquerade_as_nightly_cargo ( & [ ] )
1636
1636
. with_status ( 101 )
1637
1637
. with_stderr_data ( str![ [ r#"
1638
1638
[ERROR] the `--breaking` flag is unstable, pass `-Z unstable-options` to enable it
@@ -1687,7 +1687,7 @@ fn update_breaking_dry_run() {
1687
1687
Package :: new ( "ws" , "2.0.0" ) . publish ( ) ;
1688
1688
1689
1689
p. cargo ( "update -Zunstable-options --dry-run --breaking" )
1690
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
1690
+ . masquerade_as_nightly_cargo ( & [ ] )
1691
1691
. with_stderr_data ( str![ [ r#"
1692
1692
[UPDATING] `dummy-registry` index
1693
1693
[UPGRADING] incompatible ^1.0 -> ^2.0
@@ -1886,7 +1886,7 @@ fn update_breaking() {
1886
1886
Package :: new ( "build" , "2.0.0" ) . publish ( ) ;
1887
1887
1888
1888
p. cargo ( "update -Zunstable-options --breaking" )
1889
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
1889
+ . masquerade_as_nightly_cargo ( & [ ] )
1890
1890
. with_stderr_data ( str![ [ r#"
1891
1891
[UPDATING] `alternative` index
1892
1892
[UPGRADING] multiple-registries ^2.0 -> ^3.0
@@ -2096,7 +2096,7 @@ fn update_breaking_specific_packages() {
2096
2096
Package :: new ( "transitive-incompatible" , "2.0.0" ) . publish ( ) ;
2097
2097
2098
2098
p. cargo ( "update -Zunstable-options --breaking just-foo shared ws" )
2099
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2099
+ . masquerade_as_nightly_cargo ( & [ ] )
2100
2100
. with_stderr_data ( str![ [ r#"
2101
2101
[UPDATING] `dummy-registry` index
2102
2102
[UPGRADING] shared ^1.0 -> ^2.0
@@ -2160,7 +2160,7 @@ fn update_breaking_specific_packages_that_wont_update() {
2160
2160
Package :: new ( "transitive-incompatible" , "2.0.0" ) . publish ( ) ;
2161
2161
2162
2162
p. cargo ( "update -Zunstable-options --breaking compatible renamed-from non-semver transitive-compatible transitive-incompatible" )
2163
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2163
+ . masquerade_as_nightly_cargo ( & [ ] )
2164
2164
. with_stderr_data ( str![ [ r#"
2165
2165
[UPDATING] `[..]` index
2166
2166
@@ -2218,7 +2218,7 @@ fn update_breaking_without_lock_file() {
2218
2218
Package :: new ( "incompatible" , "2.0.0" ) . publish ( ) ;
2219
2219
2220
2220
p. cargo ( "update -Zunstable-options --breaking" )
2221
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2221
+ . masquerade_as_nightly_cargo ( & [ ] )
2222
2222
. with_stderr_data ( str![ [ r#"
2223
2223
[UPDATING] `[..]` index
2224
2224
[UPGRADING] incompatible ^1.0 -> ^2.0
@@ -2260,7 +2260,7 @@ fn update_breaking_spec_version() {
2260
2260
2261
2261
// Invalid spec
2262
2262
p. cargo ( "update -Zunstable-options --breaking incompatible@foo" )
2263
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2263
+ . masquerade_as_nightly_cargo ( & [ ] )
2264
2264
. with_status ( 101 )
2265
2265
. with_stderr_data ( str![ [ r#"
2266
2266
[ERROR] expected a version like "1.32"
@@ -2270,19 +2270,19 @@ fn update_breaking_spec_version() {
2270
2270
2271
2271
// Spec version not matching our current dependencies
2272
2272
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2273
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2274
2273
. with_stderr_data ( str![ [ r#""# ] ] )
2274
+ . masquerade_as_nightly_cargo ( & [ ] )
2275
2275
. run ( ) ;
2276
2276
2277
2277
// Spec source not matching our current dependencies
2278
2278
p
. cargo ( "update -Zunstable-options --breaking https://alternative.com#[email protected] " )
2279
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2280
2279
. with_stderr_data ( str![ [ r#""# ] ] )
2280
+ . masquerade_as_nightly_cargo ( & [ ] )
2281
2281
. run ( ) ;
2282
2282
2283
2283
// Accepted spec
2284
2284
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2285
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2285
+ . masquerade_as_nightly_cargo ( & [ ] )
2286
2286
. with_stderr_data ( str![ [ r#"
2287
2287
[UPDATING] `[..]` index
2288
2288
[UPGRADING] incompatible ^1.0 -> ^2.0
@@ -2295,7 +2295,7 @@ fn update_breaking_spec_version() {
2295
2295
// Accepted spec, full format
2296
2296
Package :: new ( "incompatible" , "3.0.0" ) . publish ( ) ;
2297
2297
p
. cargo ( "update -Zunstable-options --breaking https://github.com/rust-lang/crates.io-index#[email protected] " )
2298
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2298
+ . masquerade_as_nightly_cargo ( & [ ] )
2299
2299
. with_stderr_data ( str![ [ r#"
2300
2300
[UPDATING] `[..]` index
2301
2301
[UPGRADING] incompatible ^2.0 -> ^3.0
@@ -2307,7 +2307,7 @@ fn update_breaking_spec_version() {
2307
2307
2308
2308
// Spec matches a dependency that will not be upgraded
2309
2309
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2310
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2310
+ . masquerade_as_nightly_cargo ( & [ ] )
2311
2311
. with_stderr_data ( str![ [ r#"
2312
2312
[UPDATING] `[..]` index
2313
2313
@@ -2316,20 +2316,20 @@ fn update_breaking_spec_version() {
2316
2316
2317
2317
// Non-existing versions
2318
2318
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2319
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2320
2319
. with_stderr_data ( str![ [ r#""# ] ] )
2320
+ . masquerade_as_nightly_cargo ( & [ ] )
2321
2321
. run ( ) ;
2322
2322
2323
2323
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2324
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2325
2324
. with_stderr_data ( str![ [ r#""# ] ] )
2325
+ . masquerade_as_nightly_cargo ( & [ ] )
2326
2326
. run ( ) ;
2327
2327
}
2328
2328
2329
2329
#[ cargo_test]
2330
2330
fn update_breaking_spec_version_transitive ( ) {
2331
2331
Package :: new ( "dep" , "1.0.0" ) . publish ( ) ;
2332
- Package :: new ( "dep" , "1.1 .0" ) . publish ( ) ;
2332
+ Package :: new ( "dep" , "2.0 .0" ) . publish ( ) ;
2333
2333
2334
2334
let p = project ( )
2335
2335
. file (
@@ -2357,44 +2357,44 @@ fn update_breaking_spec_version_transitive() {
2357
2357
authors = []
2358
2358
2359
2359
[dependencies]
2360
- dep = "1.1 "
2360
+ dep = "2.0 "
2361
2361
"# ,
2362
2362
)
2363
2363
. file ( "bar/src/lib.rs" , "" )
2364
2364
. build ( ) ;
2365
2365
2366
2366
p. cargo ( "generate-lockfile" ) . run ( ) ;
2367
2367
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 ( ) ;
2370
2370
2371
2371
// Will upgrade the direct dependency
2372
2372
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2373
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2373
+ . masquerade_as_nightly_cargo ( & [ ] )
2374
2374
. with_stderr_data ( str![ [ r#"
2375
2375
[UPDATING] `[..]` index
2376
- [UPGRADING] dep ^1.0 -> ^2 .0
2376
+ [UPGRADING] dep ^1.0 -> ^3 .0
2377
2377
[LOCKING] 1 package to latest compatible version
2378
- [ADDING ] dep v2 .0.0
2378
+ [UPDATING ] dep v1.0.0 -> v3 .0.0
2379
2379
2380
2380
"# ] ] )
2381
2381
. run ( ) ;
2382
2382
2383
2383
// But not the transitive one, because bar is not a workspace member
2384
- p. cargo ( "update -Zunstable-options --breaking dep@1.1 " )
2385
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2384
+ p. cargo ( "update -Zunstable-options --breaking dep@2.0 " )
2385
+ . masquerade_as_nightly_cargo ( & [ ] )
2386
2386
. with_stderr_data ( str![ [ r#"
2387
2387
[UPDATING] `[..]` index
2388
2388
2389
2389
"# ] ] )
2390
2390
. run ( ) ;
2391
2391
2392
2392
// 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 " )
2394
2394
. with_stderr_data ( str![ [ r#"
2395
2395
[UPDATING] `[..]` index
2396
2396
[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)
2398
2398
2399
2399
"# ] ] )
2400
2400
. run ( ) ;
@@ -2448,7 +2448,7 @@ fn update_breaking_mixed_compatibility() {
2448
2448
Package :: new ( "mixed-compatibility" , "2.0.1" ) . publish ( ) ;
2449
2449
2450
2450
p. cargo ( "update -Zunstable-options --breaking" )
2451
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2451
+ . masquerade_as_nightly_cargo ( & [ ] )
2452
2452
. with_stderr_data ( str![ [ r#"
2453
2453
[UPDATING] `[..]` index
2454
2454
[UPGRADING] mixed-compatibility ^1.0 -> ^2.0
@@ -2534,7 +2534,7 @@ fn update_breaking_mixed_pinning_renaming() {
2534
2534
Package :: new ( "renamed-from" , "2.0.0" ) . publish ( ) ;
2535
2535
2536
2536
p. cargo ( "update -Zunstable-options --breaking" )
2537
- . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2537
+ . masquerade_as_nightly_cargo ( & [ ] )
2538
2538
. with_stderr_data ( str![ [ r#"
2539
2539
[UPDATING] `[..]` index
2540
2540
[UPGRADING] mixed-pinned ^1.0 -> ^2.0
0 commit comments