diff --git a/compiler/testData/integration/smoke/scriptWithClasspath/script.expected b/compiler/testData/integration/smoke/scriptWithClasspath/script.expected new file mode 100644 index 00000000000..c2dfad6f93c --- /dev/null +++ b/compiler/testData/integration/smoke/scriptWithClasspath/script.expected @@ -0,0 +1,4 @@ +OUT: +interface javax.inject.Inject + +Return code: 0 diff --git a/compiler/testData/integration/smoke/scriptWithClasspath/script.kts b/compiler/testData/integration/smoke/scriptWithClasspath/script.kts new file mode 100644 index 00000000000..9b1a132c003 --- /dev/null +++ b/compiler/testData/integration/smoke/scriptWithClasspath/script.kts @@ -0,0 +1,3 @@ +import javax.inject.Inject + +println(javaClass()) diff --git a/compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java b/compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java index de38e56c669..f51b04a143a 100644 --- a/compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java +++ b/compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java @@ -109,4 +109,9 @@ public class CompilerSmokeTest extends KotlinIntegrationTestBase { public void simpleScript() throws Exception { runCompiler("script", "-script", "script.kts", "hi", "there"); } + + @Test + public void scriptWithClasspath() throws Exception { + runCompiler("script", "-cp", new File("lib/javax.inject.jar").getAbsolutePath(), "-script", "script.kts"); + } }