mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
test(freshness_checksum): different fingeprint methods are compatible
This ensures that users can switch between different fingerprint freshness methods and still correctly rebuild stuff.
This commit is contained in:
parent
0d08e19661
commit
c0e550ee5b
@ -53,6 +53,45 @@ fn checksum_actually_uses_checksum() {
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test(nightly, reason = "requires -Zchecksum-hash-algorithm")]
|
||||
fn checksum_build_compatible_with_mtime_build() {
|
||||
let p = project()
|
||||
.file("src/main.rs", "mod a; fn main() {}")
|
||||
.file("src/a.rs", "")
|
||||
.build();
|
||||
|
||||
p.cargo("check -Zchecksum-freshness")
|
||||
.masquerade_as_nightly_cargo(&["checksum-freshness"])
|
||||
.with_stderr_data(str![[r#"
|
||||
[CHECKING] foo v0.0.1 ([ROOT]/foo)
|
||||
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
|
||||
|
||||
"#]])
|
||||
.run();
|
||||
p.cargo("check")
|
||||
.with_stderr_data(str![[r#"
|
||||
[CHECKING] foo v0.0.1 ([ROOT]/foo)
|
||||
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
|
||||
|
||||
"#]])
|
||||
.run();
|
||||
p.cargo("check -Zchecksum-freshness")
|
||||
.masquerade_as_nightly_cargo(&["checksum-freshness"])
|
||||
.with_stderr_data(str![[r#"
|
||||
[CHECKING] foo v0.0.1 ([ROOT]/foo)
|
||||
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
|
||||
|
||||
"#]])
|
||||
.run();
|
||||
p.cargo("check")
|
||||
.with_stderr_data(str![[r#"
|
||||
[CHECKING] foo v0.0.1 ([ROOT]/foo)
|
||||
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
|
||||
|
||||
"#]])
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test(nightly, reason = "requires -Zchecksum-hash-algorithm")]
|
||||
fn same_size_different_content() {
|
||||
let p = project()
|
||||
|
Loading…
x
Reference in New Issue
Block a user