quintodrome/server/subsonic/responses
Deluan Quintão 3e25ca3868
test: enable Subsonic response snapshot tests on Windows (#5427)
* fix(test): enable Subsonic response snapshot tests on Windows

Replaced cupaloy with a simple custom snapshot matcher that normalizes
CRLF line endings before comparison. The tests were skipped on Windows
via a //go:build unix tag because Git for Windows checks out snapshot
files with CRLF, while Go's xml/json.MarshalIndent always produces LF,
causing direct string comparison to fail. The new matcher reads snapshot
files with os.ReadFile and normalizes \r\n to \n before comparing.
Also added a .gitattributes in the .snapshots directory to enforce LF
checkout, and removed the now-unused cupaloy dependency.

* fix(test): add UPDATE_SNAPSHOTS support to custom snapshot matcher

Restore the ability to update snapshots via `make snapshots`
(UPDATE_SNAPSHOTS=true), which was lost when replacing cupaloy
with the custom matcher.
2026-04-27 20:19:28 -04:00
..
.snapshots test: enable Subsonic response snapshot tests on Windows (#5427) 2026-04-27 20:19:28 -04:00
errors.go Change error code type to avoid integer overflow conversion warning 2024-09-01 14:49:48 -04:00
responses.go feat(subsonic): add sonicSimilarity extension as plugin capability (#5419) 2026-04-27 17:50:09 -04:00
responses_suite_test.go test: enable Subsonic response snapshot tests on Windows (#5427) 2026-04-27 20:19:28 -04:00
responses_test.go test: enable Subsonic response snapshot tests on Windows (#5427) 2026-04-27 20:19:28 -04:00