diff --git a/compiler/testData/cli/nonExistingClassPathAndAnnotationsPath.out b/compiler/testData/cli/nonExistingClassPathAndAnnotationsPath.out new file mode 100644 index 00000000000..2503aae0888 --- /dev/null +++ b/compiler/testData/cli/nonExistingClassPathAndAnnotationsPath.out @@ -0,0 +1,3 @@ +WARNING: Classpath entry points to a non-existent location: not/existing/path +WARNING: Annotations path entry points to a non-existent location: yet/another/not/existing/path +OK diff --git a/compiler/testData/cli/nonExistingSourcePath.out b/compiler/testData/cli/nonExistingSourcePath.out new file mode 100644 index 00000000000..ef3a3fdb989 --- /dev/null +++ b/compiler/testData/cli/nonExistingSourcePath.out @@ -0,0 +1,2 @@ +ERROR: Source file or directory not found: not/existing/path +COMPILATION_ERROR diff --git a/compiler/tests/org/jetbrains/jet/cli/jvm/CliTest.java b/compiler/tests/org/jetbrains/jet/cli/jvm/CliTest.java index 76284622264..1b79b2a7169 100644 --- a/compiler/tests/org/jetbrains/jet/cli/jvm/CliTest.java +++ b/compiler/tests/org/jetbrains/jet/cli/jvm/CliTest.java @@ -173,6 +173,26 @@ public class CliTest { } } + @Test + public void nonExistingClassPathAndAnnotationsPath() { + String[] args = { + "-src", "compiler/testData/cli/simple.kt", + "-classpath", "not/existing/path", + "-annotations", "yet/another/not/existing/path", + "-output", tmpdir.getTmpDir().getPath()}; + executeCompilerCompareOutput(args); + + Assert.assertTrue(new File(tmpdir.getTmpDir(), PackageClassUtils.getPackageClassName(FqName.ROOT) + ".class").isFile()); + } + + @Test + public void nonExistingSourcePath() { + String[] args = { + "-src", "not/existing/path", + "-output", tmpdir.getTmpDir().getPath()}; + executeCompilerCompareOutput(args); + } + @Test public void testScript() { LinkedList scriptParameters = new LinkedList();