File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,45 @@ fn checksum_actually_uses_checksum() {
5353 . run ( ) ;
5454}
5555
56+ #[ cargo_test( nightly, reason = "requires -Zchecksum-hash-algorithm" ) ]
57+ fn checksum_build_compatible_with_mtime_build ( ) {
58+ let p = project ( )
59+ . file ( "src/main.rs" , "mod a; fn main() {}" )
60+ . file ( "src/a.rs" , "" )
61+ . build ( ) ;
62+
63+ p. cargo ( "check -Zchecksum-freshness" )
64+ . masquerade_as_nightly_cargo ( & [ "checksum-freshness" ] )
65+ . with_stderr_data ( str![ [ r#"
66+ [CHECKING] foo v0.0.1 ([ROOT]/foo)
67+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
68+
69+ "# ] ] )
70+ . run ( ) ;
71+ p. cargo ( "check" )
72+ . with_stderr_data ( str![ [ r#"
73+ [CHECKING] foo v0.0.1 ([ROOT]/foo)
74+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
75+
76+ "# ] ] )
77+ . run ( ) ;
78+ p. cargo ( "check -Zchecksum-freshness" )
79+ . masquerade_as_nightly_cargo ( & [ "checksum-freshness" ] )
80+ . with_stderr_data ( str![ [ r#"
81+ [CHECKING] foo v0.0.1 ([ROOT]/foo)
82+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
83+
84+ "# ] ] )
85+ . run ( ) ;
86+ p. cargo ( "check" )
87+ . with_stderr_data ( str![ [ r#"
88+ [CHECKING] foo v0.0.1 ([ROOT]/foo)
89+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
90+
91+ "# ] ] )
92+ . run ( ) ;
93+ }
94+
5695#[ cargo_test( nightly, reason = "requires -Zchecksum-hash-algorithm" ) ]
5796fn same_size_different_content ( ) {
5897 let p = project ( )
You can’t perform that action at this time.
0 commit comments