File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,48 @@ fn update_precise() {
391
391
. run ( ) ;
392
392
}
393
393
394
+ #[ cargo_test]
395
+ fn update_precise_build_metadata ( ) {
396
+ Package :: new ( "serde" , "0.0.1+first" ) . publish ( ) ;
397
+ Package :: new ( "serde" , "0.0.1+second" ) . publish ( ) ;
398
+
399
+ let p = project ( )
400
+ . file (
401
+ "Cargo.toml" ,
402
+ r#"
403
+ [package]
404
+ name = "foo"
405
+ version = "0.0.0"
406
+
407
+ [dependencies]
408
+ serde = "0.0.1"
409
+ "# ,
410
+ )
411
+ . file ( "src/lib.rs" , "" )
412
+ . build ( ) ;
413
+
414
+ p. cargo ( "generate-lockfile" ) . run ( ) ;
415
+ p. cargo ( "update serde --precise 0.0.1+first" ) . run ( ) ;
416
+
417
+ p. cargo ( "update serde --precise 0.0.1+second" )
418
+ . with_stderr (
419
+ "\
420
+ [UPDATING] `[..]` index
421
+ [UPDATING] serde v0.0.1+first -> v0.0.1+second
422
+ " ,
423
+ )
424
+ . run ( ) ;
425
+
426
+ p. cargo ( "update serde --precise 0.0.1+first" )
427
+ . with_stderr (
428
+ "\
429
+ [UPDATING] `[..]` index
430
+ [DOWNGRADING] serde v0.0.1+second -> v0.0.1+first
431
+ " ,
432
+ )
433
+ . run ( ) ;
434
+ }
435
+
394
436
#[ cargo_test]
395
437
fn update_precise_do_not_force_update_deps ( ) {
396
438
Package :: new ( "log" , "0.1.0" ) . publish ( ) ;
You can’t perform that action at this time.
0 commit comments