multiline string literals

This commit is contained in:
sergeych committed 2025-08-10 23:32:03 +03:00
1 parent ed0a21cb06
commit 63de82393a
8 files changed
+109 -18

No files matched your search

@@ -2794,4 +2794,45 @@ class ScriptTest {
println(y.list)
}
@Test
fun testMultilineStrings() = runTest {
assertEquals(
"""
This is a multiline text.
This is a second line.
""".trimIndent(), eval(
"""
"
This is a multiline text.
This is a second line.
"
""".trimIndent()
).toString()
)
assertEquals(
"""
This is a multiline text.
""".trimIndent(), eval(
"""
"
This is a multiline text.
"
""".trimIndent()
).toString()
)
assertEquals(
"""
This is a multiline text.
""".trimIndent(), eval(
"""
"
This is a multiline text.
"
""".trimIndent()
).toString()
)
}
}