File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -464,6 +464,42 @@ fn update_aggressive() {
464
464
. run ( ) ;
465
465
}
466
466
467
+ #[ cargo_test]
468
+ fn update_aggressive_conflicts_with_precise ( ) {
469
+ Package :: new ( "log" , "0.1.0" ) . publish ( ) ;
470
+ Package :: new ( "serde" , "0.2.1" ) . dep ( "log" , "0.1" ) . publish ( ) ;
471
+
472
+ let p = project ( )
473
+ . file (
474
+ "Cargo.toml" ,
475
+ r#"
476
+ [package]
477
+ name = "bar"
478
+ version = "0.0.1"
479
+ authors = []
480
+
481
+ [dependencies]
482
+ serde = "0.2"
483
+ "# ,
484
+ )
485
+ . file ( "src/lib.rs" , "" )
486
+ . build ( ) ;
487
+
488
+ p. cargo ( "check" ) . run ( ) ;
489
+
490
+ Package :: new ( "log" , "0.1.1" ) . publish ( ) ;
491
+ Package :: new ( "serde" , "0.2.2" ) . dep ( "log" , "0.1" ) . publish ( ) ;
492
+
493
+ p. cargo ( "update -p serde:0.2.1 --precise 0.2.2 --aggressive" )
494
+ . with_status ( 101 )
495
+ . with_stderr (
496
+ "\
497
+ error: cannot specify both aggressive and precise simultaneously
498
+ " ,
499
+ )
500
+ . run ( ) ;
501
+ }
502
+
467
503
// cargo update should respect its arguments even without a lockfile.
468
504
// See issue "Running cargo update without a Cargo.lock ignores arguments"
469
505
// at <https://github.com/rust-lang/cargo/issues/6872>.
You can’t perform that action at this time.
0 commit comments