mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
test: Allow redact file size w/o fraction
`cargo clean` shows file size without fraction in summary when the size is lower than 1024. And we need to avoid matching things like `%2B%23..` found in other test cases, the trailing `\s` is added to regex.
This commit is contained in:
parent
1794ce42f4
commit
ed027736e7
@ -171,7 +171,7 @@ fn add_common_redactions(subs: &mut snapbox::Redactions) {
|
||||
.unwrap();
|
||||
subs.insert(
|
||||
"[FILE_SIZE]",
|
||||
regex!(r"(?<redacted>[0-9]+(\.[0-9]+)([a-zA-Z]i)?)B"),
|
||||
regex!(r"(?<redacted>[0-9]+(\.[0-9]+)?([a-zA-Z]i)?)B\s"),
|
||||
)
|
||||
.unwrap();
|
||||
subs.insert(
|
||||
|
Loading…
x
Reference in New Issue
Block a user