Skip to content

Commit 328bc5f

Browse files
committed
test: Add auto-redaction for not found error
1 parent e35cd55 commit 328bc5f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,18 @@ static MIN_LITERAL_REDACTIONS: &[(&str, &str)] = &[
201201
("[EXE]", std::env::consts::EXE_SUFFIX),
202202
("[BROKEN_PIPE]", "Broken pipe (os error 32)"),
203203
("[BROKEN_PIPE]", "The pipe is being closed. (os error 232)"),
204+
// Unix message for an entity was not found
205+
("[NOT_FOUND]", "No such file or directory (os error 2)"),
206+
// Windows message for an entity was not found
207+
(
208+
"[NOT_FOUND]",
209+
"The system cannot find the file specified. (os error 2)",
210+
),
211+
(
212+
"[NOT_FOUND]",
213+
"The system cannot find the path specified. (os error 3)",
214+
),
215+
("[NOT_FOUND]", "program not found"),
204216
// Unix message for exit status
205217
("[EXIT_STATUS]", "exit status"),
206218
// Windows message for exit status

0 commit comments

Comments
 (0)