Allow only single expression eval in cli compiler and kotlin runner
#KT-35740 fixed also add tests and drop logger usage in the cli dependencies manager: the logger is normally unitialized in the usage scenarios, but related warnings are annoying.
This commit is contained in:
@@ -149,4 +149,16 @@ class LauncherScriptTest : TestCaseWithTmpdir() {
|
||||
workDirectory = tmpdir
|
||||
)
|
||||
}
|
||||
|
||||
fun testRunnerExpression() {
|
||||
runProcess(
|
||||
"kotlin",
|
||||
"-e",
|
||||
"val x = 2; (args + listOf(2,1).map { (it * x).toString() }).joinToString()",
|
||||
"--",
|
||||
"a",
|
||||
"b",
|
||||
expectedStdout = "a, b, 4, 2\n"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user