Make jdk root processing more robust
#KT-54337 fixed
This commit is contained in:
committed by
Space Team
parent
942def5828
commit
b50a803b6f
@@ -478,4 +478,28 @@ println(42)
|
||||
"kotlinc", "$testDataDirectory/interpreterClassLoader.kt", "-d", tmpdir.path
|
||||
)
|
||||
}
|
||||
|
||||
fun testImplicitModularJdk() {
|
||||
// see KT-54337
|
||||
val moduleInfo = tmpdir.resolve("module-info.java").apply {
|
||||
writeText(
|
||||
"""
|
||||
module test {
|
||||
requires kotlin.stdlib;
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
val testKt = tmpdir.resolve("test.kt").apply {
|
||||
writeText("fun main() {}")
|
||||
}
|
||||
val jdk11 = mapOf("JAVA_HOME" to KtTestUtil.getJdk11Home().absolutePath)
|
||||
runProcess(
|
||||
"kotlinc", moduleInfo.absolutePath, testKt.absolutePath, "-d", tmpdir.path,
|
||||
environment = jdk11,
|
||||
expectedExitCode = 0,
|
||||
expectedStdout = "",
|
||||
expectedStderr = ""
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user