Skip to content

Commit 1b4a697

Browse files
committed
feat: Added verify_file_layout() to CargoPathExt
1 parent a154b10 commit 1b4a697

File tree

7 files changed

+477
-3
lines changed

7 files changed

+477
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cargo-credential-macos-keychain = { version = "0.4.17", path = "credential/cargo
3232
cargo-credential-wincred = { version = "0.4.17", path = "credential/cargo-credential-wincred" }
3333
cargo-platform = { path = "crates/cargo-platform", version = "0.3.0" }
3434
cargo-test-macro = { version = "0.4.6", path = "crates/cargo-test-macro" }
35-
cargo-test-support = { version = "0.8.1", path = "crates/cargo-test-support" }
35+
cargo-test-support = { version = "0.9.0", path = "crates/cargo-test-support" }
3636
cargo-util = { version = "0.2.24", path = "crates/cargo-util" }
3737
cargo-util-schemas = { version = "0.10.1", path = "crates/cargo-util-schemas" }
3838
cargo_metadata = "0.21.0"

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)