Added CLI tests with non-existing paths.

This commit is contained in:
Evgeny Gerashchenko
2013-03-04 15:29:19 +04:00
parent 4213eec2a5
commit 1d6836f6aa
3 changed files with 25 additions and 0 deletions
@@ -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
public void testScript() {
LinkedList<AnalyzerScriptParameter> scriptParameters = new LinkedList<AnalyzerScriptParameter>();