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.
This commit is contained in:
davotoula
2026-04-25 15:01:33 +02:00
parent 8a1b6c033f
commit 680b1f0ef6
@@ -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)
}
}