From 680b1f0ef6759beba28ebcaab153aa0808172111 Mon Sep 17 00:00:00 2001 From: davotoula Date: Sat, 25 Apr 2026 15:01:33 +0200 Subject: [PATCH] test(quartz): normalize CRLF in pretty-printer string asserts Triple-quoted Kotlin strings inherit the source file's line endings, so on Windows checkouts (CRLF) the expected JSON contains \r\n while Jackson's pretty-printer always outputs \n. Normalize the expected side with replace("\r\n", "\n") so the assertion is platform-neutral. Surfaced by adding :quartz:jvmTest to the desktop CI matrix; previously the bare 'test' lifecycle didn't resolve jvmTest in KMP modules so the mismatch was never observed on Windows. --- .../nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quartz/src/jvmAndroidTest/kotlin/com/vitorpamplona/quartz/nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt b/quartz/src/jvmAndroidTest/kotlin/com/vitorpamplona/quartz/nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt index a24d3575b..80f18dd5c 100644 --- a/quartz/src/jvmAndroidTest/kotlin/com/vitorpamplona/quartz/nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt +++ b/quartz/src/jvmAndroidTest/kotlin/com/vitorpamplona/quartz/nip01Core/jackson/InliningTagArrayPrettyPrinterTest.kt @@ -49,7 +49,7 @@ class InliningTagArrayPrettyPrinterTest { } """.trimIndent() val json = writer.writeValueAsString(data) - assertEquals(expected, json) + assertEquals(expected.replace("\r\n", "\n"), json) val data2 = mapOf( @@ -65,7 +65,7 @@ class InliningTagArrayPrettyPrinterTest { } """.trimIndent() val json2 = writer.writeValueAsString(data2) - assertEquals(expected2, json2) + assertEquals(expected2.replace("\r\n", "\n"), json2) } @Test @@ -90,6 +90,6 @@ class InliningTagArrayPrettyPrinterTest { val prettified = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(tree) - assertEquals(nostrObject, prettified) + assertEquals(nostrObject.replace("\r\n", "\n"), prettified) } }