mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-22 07:48:26 +00:00
The control-query snapshot tests panicked on the Windows GitHub runner because git's default core.autocrlf=true converted fixture files (src/control/snapshots/*.json) to CRLF on checkout, while the in-memory JSON output is LF. trim_end() only strips trailing newlines, not interior \r, so every snapshot comparison mismatched. Two defenses: 1. .gitattributes: pin src/control/snapshots/*.json to text eol=lf so future Windows checkouts keep the fixtures LF-only regardless of local git config. 2. src/control/queries.rs (assert_snapshot): replace \r\n with \n in the expected text before comparison, so any future re-introduction of CRLF (a contributor with non-LF editor settings, a different runner, etc.) doesn't surface as a snapshot mismatch.
6 lines
271 B
Plaintext
6 lines
271 B
Plaintext
# Keep snapshot test fixtures LF-only across all platforms so that
|
|
# Windows checkouts with core.autocrlf=true don't convert them to CRLF
|
|
# (which would mismatch the actual JSON serialization output during
|
|
# snapshot comparison).
|
|
src/control/snapshots/*.json text eol=lf
|