From ab06dbfc7024b4af218eb97479aefcd794d745dc Mon Sep 17 00:00:00 2001 From: Dmitry Kovanikov Date: Tue, 22 Sep 2015 16:48:10 +0300 Subject: [PATCH] Repl: add test to check multiline support --- .../jetbrains/kotlin/idea/console/KotlinReplTest.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/idea/tests/org/jetbrains/kotlin/idea/console/KotlinReplTest.kt b/idea/tests/org/jetbrains/kotlin/idea/console/KotlinReplTest.kt index f63a17e564a..25696d239a9 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/console/KotlinReplTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/console/KotlinReplTest.kt @@ -91,6 +91,17 @@ public class KotlinReplTest : PlatformTestCase() { @Test fun testPrintlnText() = "Hello, console world!" let { testSimpleCommand("println(\"$it\")", it) } @Test fun testDivisionByZeroException() = testSimpleCommand("1 / 0", "java.lang.ArithmeticException: / by zero") + @Test fun testMultilineSupport() { + val printText = "Print in multiline!" + + sendCommand("fun f() {\n" + + " println(\"$printText\")\n" + + "}\n") + sendCommand("f()") + + waitForExpectedOutput(printText) + } + @Test fun testReadLineSingle() { val readLineText = "ReadMe!"