Skip to content

fix(golden): preserve line endings across platforms - #934

Open
alloutflo wants to merge 1 commit into
charmbracelet:mainfrom
alloutflo:codex/fix-golden-windows-line-endings
Open

fix(golden): preserve line endings across platforms#934
alloutflo wants to merge 1 commit into
charmbracelet:mainfrom
alloutflo:codex/fix-golden-windows-line-endings

Conversation

@alloutflo

Copy link
Copy Markdown

What changed

  • mark *.golden files as binary so Git preserves their bytes on every platform
  • remove the Windows-only CRLF normalization workaround from exp/golden

Why

Git for Windows can otherwise rewrite golden fixtures during checkout. Keeping those fixtures byte-for-byte stable fixes the cross-platform behavior at the source instead of normalizing only the expected value at test runtime.

Verification

  • go build ./..., go test -race ./..., and go vet ./... in exp/golden
  • go build ./..., go test -race ./..., and go vet ./... in exp/teatest
  • go build ./..., go test -race ./..., and go vet ./... in exp/teatest/v2
  • checkout simulation with core.autocrlf=true: the golden fixture retained zero CRLF sequences and the same SHA-256 digest as the source file

Fixes #389.

Development assistance: OpenAI Codex (GPT-5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: fix exp/teatest tests on windows

1 participant