command line script launcher
% ./bin/kotlin -script hello.ktscript
hello world
% cat hello.ktscript
fun hello(what: String) = println("hello $what")
hello("world")
Note it currently takes 8 seconds to evaluate hello world script.
This commit is contained in:
@@ -8,6 +8,7 @@ OUT -altHeaders [String] Path to the alternative library headers paths
|
||||
OUT -mode [String] Special compiler modes: stubs or altHeaders
|
||||
OUT -output [String] output directory
|
||||
OUT -module [String] module to compile
|
||||
OUT -script [flag]
|
||||
OUT -tags [flag]
|
||||
OUT -verbose [flag]
|
||||
OUT -version [flag]
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
println("hello world")
|
||||
@@ -0,0 +1,2 @@
|
||||
OUT hello world
|
||||
Return code: 0
|
||||
@@ -50,4 +50,9 @@ public class CompilerSmokeTest extends KotlinIntegrationTestBase {
|
||||
|
||||
runCompiler("hello.compile", "-src", "hello.kt", "-jar", jar);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void script() throws Exception {
|
||||
runCompiler("script", "-script", "hello.ktscript");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user