diff --git a/.gitattributes b/.gitattributes index 1fbeadf800..59568dc78d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,7 @@ # binary so git never applies CRLF/text normalization or textual diff/merge, which # would corrupt the compressed stream (important on Windows checkouts). *.gz binary + +# Golden test resources are compared byte-for-byte against generated strings: +# force LF everywhere so a Windows CRLF checkout cannot break the comparison. +*.golden text eol=lf diff --git a/quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip50Search/IndexableContentGoldenTest.kt b/quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip50Search/IndexableContentGoldenTest.kt index 0fc7a7697f..e68af7c54b 100644 --- a/quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip50Search/IndexableContentGoldenTest.kt +++ b/quartz/src/jvmTest/kotlin/com/vitorpamplona/quartz/nip50Search/IndexableContentGoldenTest.kt @@ -107,7 +107,9 @@ class IndexableContentGoldenTest { "a kind's indexed text changed. If deliberate: rerun with -Dgolden=write, update " + "references/searchable-kinds.md in the same commit, and schedule a reindex " + "(IEventStore.reindexFullTextSearch) — existing databases keep their old text.", - golden.readText().trim(), + // Normalize CRLF: Windows checkouts (autocrlf) would otherwise fail this comparison + // on invisible line endings alone. + golden.readText().replace("\r\n", "\n").trim(), actual.trim(), ) } @@ -211,6 +213,7 @@ class IndexableContentGoldenTest { 10100, 10154, 11871, + 11998, 12473, 15128, 15129, diff --git a/quartz/src/jvmTest/resources/indexable-content.golden b/quartz/src/jvmTest/resources/indexable-content.golden index 161a2acdf6..bc38d78371 100644 --- a/quartz/src/jvmTest/resources/indexable-content.golden +++ b/quartz/src/jvmTest/resources/indexable-content.golden @@ -52,6 +52,7 @@ 10100 10154 The Title\nThe Description 11871 The content body. +11998 12473 The Alt 15128 The Title\nThe Description 15129 The Title\nThe Description