fix(test):; Allow '0 files' to not be redacted

This commit is contained in:
Ed Page 2024-09-21 20:47:07 -05:00
parent a6cf1be655
commit 1f5f7021e5
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ fn add_regex_redactions(subs: &mut snapbox::Redactions) {
.unwrap();
subs.insert(
"[FILE_NUM]",
regex!(r"\[(REMOVED|SUMMARY)\] (?<redacted>[0-9]+) files"),
regex!(r"\[(REMOVED|SUMMARY)\] (?<redacted>[1-9][0-9]*) files"),
)
.unwrap();
subs.insert(

View File

@ -849,7 +849,7 @@ fn clean_dry_run() {
p.cargo("clean --dry-run")
.with_stdout_data("")
.with_stderr_data(str![[r#"
[SUMMARY] [FILE_NUM] files
[SUMMARY] 0 files
[WARNING] no files deleted due to --dry-run
"#]])