Refactor test utils: don't add main-kts to the classpath...

by default on running scripting tests via the call to K2JVMCompiler
This commit is contained in:
Ilya Chernikov
2019-09-11 17:56:03 +02:00
parent 49003c9839
commit b2d2ba5811
3 changed files with 32 additions and 12 deletions
@@ -20,7 +20,14 @@ class MainKtsIT {
@Test
fun testImport() {
runWithK2JVMCompiler("$TEST_DATA_ROOT/import-test.main.kts", listOf("Hi from common", "Hi from middle", "sharedVar == 5"))
val mainKtsJar = File("dist/kotlinc/lib/kotlin-main-kts.jar")
Assert.assertTrue("kotlin-main-kts.jar not found, run dist task: ${mainKtsJar.absolutePath}", mainKtsJar.exists())
runWithK2JVMCompiler(
"$TEST_DATA_ROOT/import-test.main.kts",
listOf("Hi from common", "Hi from middle", "sharedVar == 5"),
classpath = listOf(mainKtsJar)
)
}
@Test