From 290f54ab871fd8267cdecab78cffd0f79cedd39a Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 13 Jan 2017 19:10:48 +0100 Subject: [PATCH] Fix comparison of post and reply texts --- src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"] } } } -- 2.7.4