Skip to content
This repository was archived by the owner on Apr 13, 2026. It is now read-only.

Commit 96a15cd

Browse files
committed
fix(test): normalize .exe suffix in snapshots for Windows CI
The snapshot tests compare help output which includes the binary name. On Windows this is `opnsense-config-faker.exe` causing snapshot mismatches. Add normalization to strip the .exe suffix. Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
1 parent ee86d88 commit 96a15cd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/common/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,13 @@ pub fn normalize_output(text: &str) -> String {
254254
}
255255
}
256256

257+
// Normalize Windows .exe suffix in binary names for cross-platform snapshot stability
258+
let with_normalized_exe =
259+
with_normalized_dirs.replace("opnsense-config-faker.exe", "opnsense-config-faker");
260+
257261
// Normalize whitespace
258262
let whitespace_regex = Regex::new(r"\s+").unwrap();
259-
let normalized = whitespace_regex.replace_all(&with_normalized_dirs, " ");
263+
let normalized = whitespace_regex.replace_all(&with_normalized_exe, " ");
260264

261265
// Trim and return
262266
normalized.trim().to_string()

0 commit comments

Comments
 (0)