From 7f952fd540af5a6139ea039449a6414c6334eaee Mon Sep 17 00:00:00 2001 From: "Vassiliy.Kudryashov" Date: Wed, 19 Oct 2022 11:50:13 +0300 Subject: [PATCH] Sandboxed test is not compiling because of illegal unicode escape #1134 --- .../codegen/model/constructor/tree/CgMethodConstructor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgMethodConstructor.kt b/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgMethodConstructor.kt index f6bdc6a901..f2844b0309 100644 --- a/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgMethodConstructor.kt +++ b/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgMethodConstructor.kt @@ -398,7 +398,7 @@ internal class CgMethodConstructor(val context: CgContext) : CgContextOwner by c } private fun String.escapeControlChars() : String { - return this.replace("\b", "\\b").replace("\n", "\\n").replace("\t", "\\t").replace("\r", "\\r") + return this.replace("\b", "\\b").replace("\n", "\\n").replace("\t", "\\t").replace("\r", "\\r").replace("\\u","\\\\u") } private fun writeWarningAboutCrash() {