Skip to content

Commit b90ba01

Browse files
committed
test: Auto-redact file hash
1 parent e28c99d commit b90ba01

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ fn add_common_redactions(subs: &mut snapbox::Redactions) {
165165
regex::Regex::new("home/\\.cargo/registry/src/-(?<redacted>[a-z0-9]+)").unwrap(),
166166
)
167167
.unwrap();
168+
subs.insert(
169+
"[HASH]",
170+
regex::Regex::new(r"[a-z0-9\-_]+-(?<redacted>[0-9a-f]{16})").unwrap(),
171+
)
172+
.unwrap();
168173
subs.insert("[HOST_TARGET]", rustc_host()).unwrap();
169174
if let Some(alt_target) = try_alternate() {
170175
subs.insert("[ALT_TARGET]", alt_target).unwrap();

0 commit comments

Comments
 (0)