Add new compiler argument for passing script resolver environment
This commit is contained in:
@@ -92,6 +92,18 @@ class CompilerApiTest : KotlinIntegrationTestBase() {
|
||||
}
|
||||
}
|
||||
|
||||
fun testScriptResolverEnvironmentArgsParsing() {
|
||||
|
||||
fun args(body: K2JVMCompilerArguments.() -> Unit): K2JVMCompilerArguments =
|
||||
K2JVMCompilerArguments().apply(body)
|
||||
|
||||
val messageCollector = TestMessageCollector()
|
||||
Assert.assertEquals(hashMapOf("abc" to "def", "11" to "ab cd \\ \""),
|
||||
K2JVMCompiler.createScriptResolverEnvironment(
|
||||
args { scriptResolverEnvironment = arrayOf("abc=def", """11="ab cd \\ \""""") },
|
||||
messageCollector))
|
||||
}
|
||||
|
||||
fun testHelloAppLocal() {
|
||||
val messageCollector = TestMessageCollector()
|
||||
val jar = tmpdir.absolutePath + File.separator + "hello.jar"
|
||||
|
||||
Reference in New Issue
Block a user