File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -428,6 +428,41 @@ fn update_precise_without_package() {
428
428
. run ( ) ;
429
429
}
430
430
431
+ #[ cargo_test]
432
+ fn update_aggressive_without_package ( ) {
433
+ Package :: new ( "serde" , "0.2.0" ) . publish ( ) ;
434
+
435
+ let p = project ( )
436
+ . file (
437
+ "Cargo.toml" ,
438
+ r#"
439
+ [package]
440
+ name = "bar"
441
+ version = "0.0.1"
442
+ authors = []
443
+
444
+ [dependencies]
445
+ serde = "0.2"
446
+ "# ,
447
+ )
448
+ . file ( "src/lib.rs" , "" )
449
+ . build ( ) ;
450
+
451
+ p. cargo ( "build" ) . run ( ) ;
452
+
453
+ Package :: new ( "serde" , "0.2.1" ) . publish ( ) ;
454
+
455
+ p. cargo ( "update --aggressive" )
456
+ . with_stderr (
457
+ "\
458
+ [WARNING] aggressive is only supported with \" --package <SPEC>\" , this will become a hard error in a future release.
459
+ [UPDATING] `[..]` index
460
+ [UPDATING] serde v0.2.0 -> v0.2.1
461
+ " ,
462
+ )
463
+ . run ( ) ;
464
+ }
465
+
431
466
// cargo update should respect its arguments even without a lockfile.
432
467
// See issue "Running cargo update without a Cargo.lock ignores arguments"
433
468
// at <https://github.com/rust-lang/cargo/issues/6872>.
You can’t perform that action at this time.
0 commit comments