Skip to content

Commit c6ef5b5

Browse files
committed
feat: Added verify_file_layout() to CargoPathExt
1 parent b2c0aea commit c6ef5b5

File tree

5 files changed

+475
-1
lines changed

5 files changed

+475
-1
lines changed

crates/cargo-test-support/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cargo-test-support"
3-
version = "0.8.1"
3+
version = "0.9.0"
44
edition.workspace = true
55
rust-version = "1.89" # MSRV:1
66
license.workspace = true

crates/cargo-test-support/src/compare.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,12 @@ fn add_regex_redactions(subs: &mut snapbox::Redactions) {
229229
.unwrap();
230230
subs.insert("[HASH]", regex!(r"/[a-z0-9\-_]+-(?<redacted>[0-9a-f]{16})"))
231231
.unwrap();
232+
// Match multi-part hashes like `06/b451d0d6f88b1d` used in directory paths
233+
subs.insert("[HASH]", regex!(r"/(?<redacted>[a-f0-9]{2}\/[0-9a-f]{14})"))
234+
.unwrap();
235+
// Match file name hashes like `foo-06b451d0d6f88b1d`
236+
subs.insert("[HASH]", regex!(r"[a-z0-9]+-(?<redacted>[a-f0-9]{16})"))
237+
.unwrap();
232238
subs.insert(
233239
"[AVG_ELAPSED]",
234240
regex!(r"(?<redacted>[0-9]+(\.[0-9]+)?) ns/iter"),

0 commit comments

Comments
 (0)