Added CLI tests with non-existing paths.
This commit is contained in:
@@ -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
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
ERROR: Source file or directory not found: not/existing/path
|
||||||
|
COMPILATION_ERROR
|
||||||
@@ -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
|
@Test
|
||||||
public void testScript() {
|
public void testScript() {
|
||||||
LinkedList<AnalyzerScriptParameter> scriptParameters = new LinkedList<AnalyzerScriptParameter>();
|
LinkedList<AnalyzerScriptParameter> scriptParameters = new LinkedList<AnalyzerScriptParameter>();
|
||||||
|
|||||||
Reference in New Issue
Block a user