@@ -2296,7 +2296,12 @@ fn update_breaking_spec_version() {
22962296 // Invalid spec
22972297 p. cargo ( "update -Zunstable-options --breaking incompatible@foo" )
22982298 . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2299- . with_stderr ( "" )
2299+ . with_status ( 101 )
2300+ . with_stderr (
2301+ "\
2302+ [ERROR] expected a version like \" 1.32\"
2303+ " ,
2304+ )
23002305 . run ( ) ;
23012306
23022307 // Spec version not matching our current dependencies
@@ -2314,20 +2319,38 @@ fn update_breaking_spec_version() {
23142319 // Accepted spec
23152320 p
. cargo ( "update -Zunstable-options --breaking [email protected] " ) 23162321 . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2317- . with_stderr ( "" )
2322+ . with_stderr (
2323+ "\
2324+ [UPDATING] `[..]` index
2325+ [UPGRADING] incompatible ^1.0 -> ^2.0
2326+ [LOCKING] 1 package to latest compatible version
2327+ [UPDATING] incompatible v1.0.0 -> v2.0.0
2328+ " ,
2329+ )
23182330 . run ( ) ;
23192331
23202332 // Accepted spec, full format
23212333 Package :: new ( "incompatible" , "3.0.0" ) . publish ( ) ;
23222334 p
. cargo ( "update -Zunstable-options --breaking https://github.com/rust-lang/crates.io-index#[email protected] " ) 23232335 . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2324- . with_stderr ( "" )
2336+ . with_stderr (
2337+ "\
2338+ [UPDATING] `[..]` index
2339+ [UPGRADING] incompatible ^2.0 -> ^3.0
2340+ [LOCKING] 1 package to latest compatible version
2341+ [UPDATING] incompatible v2.0.0 -> v3.0.0
2342+ " ,
2343+ )
23252344 . run ( ) ;
23262345
23272346 // Spec matches a dependency that will not be upgraded
23282347 p
. cargo ( "update -Zunstable-options --breaking [email protected] " ) 23292348 . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2330- . with_stderr ( "" )
2349+ . with_stderr (
2350+ "\
2351+ [UPDATING] `[..]` index
2352+ " ,
2353+ )
23312354 . run ( ) ;
23322355
23332356 // Non-existing versions
@@ -2387,14 +2410,24 @@ fn update_breaking_spec_version_transitive() {
23872410 // Will upgrade the direct dependency
23882411 p
. cargo ( "update -Zunstable-options --breaking [email protected] " ) 23892412 . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2390- // FIXME: Should upgrade a dependency here.
2391- . with_stderr ( "" )
2413+ . with_stderr (
2414+ "\
2415+ [UPDATING] `[..]` index
2416+ [UPGRADING] dep ^1.0 -> ^2.0
2417+ [LOCKING] 1 package to latest compatible version
2418+ [ADDING] dep v2.0.0
2419+ " ,
2420+ )
23922421 . run ( ) ;
23932422
23942423 // But not the transitive one, because bar is not a workspace member
23952424 p
. cargo ( "update -Zunstable-options --breaking [email protected] " ) 23962425 . masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2397- . with_stderr ( "" )
2426+ . with_stderr (
2427+ "\
2428+ [UPDATING] `[..]` index
2429+ " ,
2430+ )
23982431 . run ( ) ;
23992432
24002433 // A non-breaking update is different, as it will update transitive dependencies
0 commit comments