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 @@ -3529,3 +3529,38 @@ fn unpack_again_when_cargo_ok_is_unrecognized() {
35293529 let ok = fs:: read_to_string ( & cargo_ok) . unwrap ( ) ;
35303530 assert_eq ! ( & ok, r#"{"v":1}"# ) ;
35313531}
3532+
3533+ #[ cargo_test]
3534+ fn differ_only_by_metadata ( ) {
3535+ let p = project ( )
3536+ . file (
3537+ "Cargo.toml" ,
3538+ r#"
3539+ [package]
3540+ name = "foo"
3541+ version = "0.0.1"
3542+ authors = []
3543+
3544+ [dependencies]
3545+ baz = "=0.0.1"
3546+ "# ,
3547+ )
3548+ . file ( "src/main.rs" , "fn main() {}" )
3549+ . build ( ) ;
3550+
3551+ Package :: new ( "baz" , "0.0.1+b" ) . publish ( ) ;
3552+ Package :: new ( "baz" , "0.0.1+c" ) . yanked ( true ) . publish ( ) ;
3553+
3554+ p. cargo ( "check" )
3555+ . with_stderr (
3556+ "\
3557+ [UPDATING] `dummy-registry` index
3558+ [DOWNLOADING] crates ...
3559+ [DOWNLOADED] [..] v0.0.1+b (registry `dummy-registry`)
3560+ [CHECKING] baz v0.0.1+b
3561+ [CHECKING] foo v0.0.1 ([CWD])
3562+ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
3563+ " ,
3564+ )
3565+ . run ( ) ;
3566+ }
You can’t perform that action at this time.
0 commit comments