Repl: add test to check multiline support
This commit is contained in:
committed by
Pavel V. Talanov
parent
bfe01cccea
commit
ab06dbfc70
@@ -91,6 +91,17 @@ public class KotlinReplTest : PlatformTestCase() {
|
|||||||
@Test fun testPrintlnText() = "Hello, console world!" let { testSimpleCommand("println(\"$it\")", it) }
|
@Test fun testPrintlnText() = "Hello, console world!" let { testSimpleCommand("println(\"$it\")", it) }
|
||||||
@Test fun testDivisionByZeroException() = testSimpleCommand("1 / 0", "java.lang.ArithmeticException: / by zero")
|
@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() {
|
@Test fun testReadLineSingle() {
|
||||||
val readLineText = "ReadMe!"
|
val readLineText = "ReadMe!"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user