@@ -2261,7 +2261,11 @@ fn update_breaking_spec_version() {
2261
2261
// Invalid spec
2262
2262
p. cargo ( "update -Zunstable-options --breaking incompatible@foo" )
2263
2263
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2264
- . with_stderr_data ( str![ [ r#""# ] ] )
2264
+ . with_status ( 101 )
2265
+ . with_stderr_data ( str![ [ r#"
2266
+ [ERROR] expected a version like "1.32"
2267
+
2268
+ "# ] ] )
2265
2269
. run ( ) ;
2266
2270
2267
2271
// Spec version not matching our current dependencies
@@ -2279,20 +2283,35 @@ fn update_breaking_spec_version() {
2279
2283
// Accepted spec
2280
2284
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2281
2285
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2282
- . with_stderr_data ( str![ [ r#""# ] ] )
2286
+ . with_stderr_data ( str![ [ r#"
2287
+ [UPDATING] `[..]` index
2288
+ [UPGRADING] incompatible ^1.0 -> ^2.0
2289
+ [LOCKING] 1 package to latest compatible version
2290
+ [UPDATING] incompatible v1.0.0 -> v2.0.0
2291
+
2292
+ "# ] ] )
2283
2293
. run ( ) ;
2284
2294
2285
2295
// Accepted spec, full format
2286
2296
Package :: new ( "incompatible" , "3.0.0" ) . publish ( ) ;
2287
2297
p
. cargo ( "update -Zunstable-options --breaking https://github.com/rust-lang/crates.io-index#[email protected] " )
2288
2298
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2289
- . with_stderr_data ( str![ [ r#""# ] ] )
2299
+ . with_stderr_data ( str![ [ r#"
2300
+ [UPDATING] `[..]` index
2301
+ [UPGRADING] incompatible ^2.0 -> ^3.0
2302
+ [LOCKING] 1 package to latest compatible version
2303
+ [UPDATING] incompatible v2.0.0 -> v3.0.0
2304
+
2305
+ "# ] ] )
2290
2306
. run ( ) ;
2291
2307
2292
2308
// Spec matches a dependency that will not be upgraded
2293
2309
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2294
2310
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2295
- . with_stderr_data ( str![ [ r#""# ] ] )
2311
+ . with_stderr_data ( str![ [ r#"
2312
+ [UPDATING] `[..]` index
2313
+
2314
+ "# ] ] )
2296
2315
. run ( ) ;
2297
2316
2298
2317
// Non-existing versions
@@ -2352,14 +2371,22 @@ fn update_breaking_spec_version_transitive() {
2352
2371
// Will upgrade the direct dependency
2353
2372
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2354
2373
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2355
- // FIXME: Should upgrade a dependency here.
2356
- . with_stderr_data ( str![ [ r#""# ] ] )
2374
+ . with_stderr_data ( str![ [ r#"
2375
+ [UPDATING] `[..]` index
2376
+ [UPGRADING] dep ^1.0 -> ^2.0
2377
+ [LOCKING] 1 package to latest compatible version
2378
+ [ADDING] dep v2.0.0
2379
+
2380
+ "# ] ] )
2357
2381
. run ( ) ;
2358
2382
2359
2383
// But not the transitive one, because bar is not a workspace member
2360
2384
p
. cargo ( "update -Zunstable-options --breaking [email protected] " )
2361
2385
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2362
- . with_stderr_data ( str![ [ r#""# ] ] )
2386
+ . with_stderr_data ( str![ [ r#"
2387
+ [UPDATING] `[..]` index
2388
+
2389
+ "# ] ] )
2363
2390
. run ( ) ;
2364
2391
2365
2392
// A non-breaking update is different, as it will update transitive dependencies
0 commit comments