Skip to content

Commit 3b289b7

Browse files
committed
fix(test):; Allow '0 files' to not be redacted
1 parent a51d68a commit 3b289b7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ fn add_regex_redactions(subs: &mut snapbox::Redactions) {
208208
.unwrap();
209209
subs.insert(
210210
"[FILE_NUM]",
211-
regex!(r"\[(REMOVED|SUMMARY)\] (?<redacted>[0-9]+) files"),
211+
regex!(r"\[(REMOVED|SUMMARY)\] (?<redacted>[1-9][0-9]*) files"),
212212
)
213213
.unwrap();
214214
subs.insert(

tests/testsuite/clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ fn clean_dry_run() {
849849
p.cargo("clean --dry-run")
850850
.with_stdout_data("")
851851
.with_stderr_data(str![[r#"
852-
[SUMMARY] [FILE_NUM] files
852+
[SUMMARY] 0 files
853853
[WARNING] no files deleted due to --dry-run
854854
855855
"#]])

0 commit comments

Comments
 (0)