From: David ‘Bombe’ Roden Date: Fri, 13 Jan 2017 18:10:48 +0000 (+0100) Subject: Fix comparison of post and reply texts X-Git-Tag: 0.9.7^2~345 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=290f54ab871fd8267cdecab78cffd0f79cedd39a Fix comparison of post and reply texts --- diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt index 3bdcb4a..e6ba1ea 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt @@ -107,14 +107,14 @@ abstract class SoneCommandTest { expect("Sone", post.sone.id) { it["Sone"] } expect("recipient", post.recipientId.orNull()) { it["Recipient"] } expect("time", post.time.toString()) { it["Time"] } - expect("text", post.text) { it["Text"] } + expect("text", post.text.replace("\\", "\\\\").replace("\r", "\\r").replace("\n", "\\n")) { it["Text"] } } protected fun matchesReply(reply: PostReply) = OneByOneMatcher>().apply { expect("ID", reply.id) { it["ID"] } expect("Sone", reply.sone.id) { it["Sone"] } expect("time", reply.time.toString()) { it["Time"] } - expect("text", reply.text) { it["Text"] } + expect("text", reply.text.replace("\\", "\\\\").replace("\r", "\\r").replace("\n", "\\n")) { it["Text"] } } }