@@ -2247,7 +2247,12 @@ fn update_breaking_spec_version() {
2247
2247
// Invalid spec
2248
2248
p. cargo ( "update -Zunstable-options --breaking incompatible@foo" )
2249
2249
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2250
- . with_stderr ( "" )
2250
+ . with_status ( 101 )
2251
+ . with_stderr (
2252
+ "\
2253
+ [ERROR] expected a version like \" 1.32\"
2254
+ " ,
2255
+ )
2251
2256
. run ( ) ;
2252
2257
2253
2258
// Spec version not matching our current dependencies
@@ -2265,20 +2270,38 @@ fn update_breaking_spec_version() {
2265
2270
// Accepted spec
2266
2271
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2267
2272
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2268
- . with_stderr ( "" )
2273
+ . with_stderr (
2274
+ "\
2275
+ [UPDATING] `[..]` index
2276
+ [UPGRADING] incompatible ^1.0 -> ^2.0
2277
+ [LOCKING] 1 package to latest compatible version
2278
+ [UPDATING] incompatible v1.0.0 -> v2.0.0
2279
+ " ,
2280
+ )
2269
2281
. run ( ) ;
2270
2282
2271
2283
// Accepted spec, full format
2272
2284
Package :: new ( "incompatible" , "3.0.0" ) . publish ( ) ;
2273
2285
p
. cargo ( "update -Zunstable-options --breaking https://github.com/rust-lang/crates.io-index#[email protected] " )
2274
2286
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2275
- . with_stderr ( "" )
2287
+ . with_stderr (
2288
+ "\
2289
+ [UPDATING] `[..]` index
2290
+ [UPGRADING] incompatible ^2.0 -> ^3.0
2291
+ [LOCKING] 1 package to latest compatible version
2292
+ [UPDATING] incompatible v2.0.0 -> v3.0.0
2293
+ " ,
2294
+ )
2276
2295
. run ( ) ;
2277
2296
2278
2297
// Spec matches a dependency that will not be upgraded
2279
2298
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2280
2299
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2281
- . with_stderr ( "" )
2300
+ . with_stderr (
2301
+ "\
2302
+ [UPDATING] `[..]` index
2303
+ " ,
2304
+ )
2282
2305
. run ( ) ;
2283
2306
2284
2307
// Non-existing versions
@@ -2338,14 +2361,24 @@ fn update_breaking_spec_version_transitive() {
2338
2361
// Will upgrade the direct dependency
2339
2362
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2340
2363
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2341
- // FIXME: Should upgrade a dependency here.
2342
- . with_stderr ( "" )
2364
+ . with_stderr (
2365
+ "\
2366
+ [UPDATING] `[..]` index
2367
+ [UPGRADING] dep ^1.0 -> ^2.0
2368
+ [LOCKING] 1 package to latest compatible version
2369
+ [ADDING] dep v2.0.0
2370
+ " ,
2371
+ )
2343
2372
. run ( ) ;
2344
2373
2345
2374
// But not the transitive one, because bar is not a workspace member
2346
2375
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2347
2376
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2348
- . with_stderr ( "" )
2377
+ . with_stderr (
2378
+ "\
2379
+ [UPDATING] `[..]` index
2380
+ " ,
2381
+ )
2349
2382
. run ( ) ;
2350
2383
2351
2384
// A non-breaking update is different, as it will update transitive dependencies
0 commit comments