Skip to content

Commit

Permalink
Added CLI tests with non-existing paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Gerashchenko authored and Evgeny Gerashchenko committed Mar 4, 2013
1 parent 4213eec commit 1d6836f
Show file tree
Hide file tree
Showing 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
2 changes: 2 additions & 0 deletions compiler/testData/cli/nonExistingSourcePath.out
@@ -0,0 +1,2 @@
ERROR: Source file or directory not found: not/existing/path
COMPILATION_ERROR
20 changes: 20 additions & 0 deletions compiler/tests/org/jetbrains/jet/cli/jvm/CliTest.java
Expand Up @@ -173,6 +173,26 @@ public void printArguments() {
}
}

@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>();
Expand Down

0 comments on commit 1d6836f

Please sign in to comment.