Convert line endings when creating ReplCodeLine, fixes KT-15861
(cherry picked from commit 894ee4c)
This commit is contained in:
@@ -82,6 +82,23 @@ class GenericReplTest : TestCase() {
|
||||
Disposer.dispose(disposable)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testReplCodeFormat() {
|
||||
|
||||
val disposable = Disposer.newDisposable()
|
||||
|
||||
val repl = TestRepl(disposable,
|
||||
listOf(File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-runtime.jar")),
|
||||
"kotlin.script.templates.standard.ScriptTemplateWithArgs")
|
||||
|
||||
val codeLine0 = ReplCodeLine(0, "val l1 = 1\r\nl1\r\n")
|
||||
val res0 = repl.replCompiler?.check(codeLine0)
|
||||
val res0c = res0 as? ReplCheckResult.Ok
|
||||
TestCase.assertNotNull("Unexpected compile result: $res0", res0c)
|
||||
|
||||
Disposer.dispose(disposable)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testRepPackage() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user