From adfdfa45cc9c613dbb7b77ab923e4a26e8ef83db Mon Sep 17 00:00:00 2001 From: davotoula Date: Sat, 25 Apr 2026 15:16:37 +0200 Subject: [PATCH] test(quartz): also normalize CRLF on Jackson output Jackson's pretty-printer can emit \r\n on Windows depending on the configured DefaultIndenter, so the previous one-sided normalization still mismatched. Normalize both sides of the assert to LF. --- .../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 80f18dd5c..be489b5aa 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.replace("\r\n", "\n"), json) + assertEquals(expected.replace("\r\n", "\n"), json.replace("\r\n", "\n")) val data2 = mapOf( @@ -65,7 +65,7 @@ class InliningTagArrayPrettyPrinterTest { } """.trimIndent() val json2 = writer.writeValueAsString(data2) - assertEquals(expected2.replace("\r\n", "\n"), json2) + assertEquals(expected2.replace("\r\n", "\n"), json2.replace("\r\n", "\n")) } @Test @@ -90,6 +90,6 @@ class InliningTagArrayPrettyPrinterTest { val prettified = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(tree) - assertEquals(nostrObject.replace("\r\n", "\n"), prettified) + assertEquals(nostrObject.replace("\r\n", "\n"), prettified.replace("\r\n", "\n")) } }