@@ -2264,7 +2264,12 @@ fn update_breaking_spec_version() {
2264
2264
// Invalid spec
2265
2265
p. cargo ( "update -Zunstable-options --breaking incompatible@foo" )
2266
2266
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2267
- . with_stderr ( "" )
2267
+ . with_status ( 101 )
2268
+ . with_stderr (
2269
+ "\
2270
+ [ERROR] expected a version like \" 1.32\"
2271
+ " ,
2272
+ )
2268
2273
. run ( ) ;
2269
2274
2270
2275
// Spec version not matching our current dependencies
@@ -2282,20 +2287,38 @@ fn update_breaking_spec_version() {
2282
2287
// Accepted spec
2283
2288
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2284
2289
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2285
- . with_stderr ( "" )
2290
+ . with_stderr (
2291
+ "\
2292
+ [UPDATING] `[..]` index
2293
+ [UPGRADING] incompatible ^1.0 -> ^2.0
2294
+ [LOCKING] 1 package to latest compatible version
2295
+ [UPDATING] incompatible v1.0.0 -> v2.0.0
2296
+ " ,
2297
+ )
2286
2298
. run ( ) ;
2287
2299
2288
2300
// Accepted spec, full format
2289
2301
Package :: new ( "incompatible" , "3.0.0" ) . publish ( ) ;
2290
2302
p
. cargo ( "update -Zunstable-options --breaking https://github.com/rust-lang/crates.io-index#[email protected] " )
2291
2303
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2292
- . with_stderr ( "" )
2304
+ . with_stderr (
2305
+ "\
2306
+ [UPDATING] `[..]` index
2307
+ [UPGRADING] incompatible ^2.0 -> ^3.0
2308
+ [LOCKING] 1 package to latest compatible version
2309
+ [UPDATING] incompatible v2.0.0 -> v3.0.0
2310
+ " ,
2311
+ )
2293
2312
. run ( ) ;
2294
2313
2295
2314
// Spec matches a dependency that will not be upgraded
2296
2315
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2297
2316
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2298
- . with_stderr ( "" )
2317
+ . with_stderr (
2318
+ "\
2319
+ [UPDATING] `[..]` index
2320
+ " ,
2321
+ )
2299
2322
. run ( ) ;
2300
2323
2301
2324
// Non-existing versions
@@ -2355,14 +2378,24 @@ fn update_breaking_spec_version_transitive() {
2355
2378
// Will upgrade the direct dependency
2356
2379
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2357
2380
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2358
- // FIXME: Should upgrade a dependency here.
2359
- . with_stderr ( "" )
2381
+ . with_stderr (
2382
+ "\
2383
+ [UPDATING] `[..]` index
2384
+ [UPGRADING] dep ^1.0 -> ^2.0
2385
+ [LOCKING] 1 package to latest compatible version
2386
+ [ADDING] dep v2.0.0
2387
+ " ,
2388
+ )
2360
2389
. run ( ) ;
2361
2390
2362
2391
// But not the transitive one, because bar is not a workspace member
2363
2392
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2364
2393
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2365
- . with_stderr ( "" )
2394
+ . with_stderr (
2395
+ "\
2396
+ [UPDATING] `[..]` index
2397
+ " ,
2398
+ )
2366
2399
. run ( ) ;
2367
2400
2368
2401
// A non-breaking update is different, as it will update transitive dependencies
0 commit comments