|
|
@@ -27,7 +27,9 @@ import org.apache.tools.ant.BuildException; |
|
|
|
import org.apache.tools.ant.BuildFileRule; |
|
|
|
import org.apache.tools.ant.DirectoryScanner; |
|
|
|
import org.apache.tools.ant.FileUtilities; |
|
|
|
import org.apache.tools.ant.taskdefs.condition.JavaVersion; |
|
|
|
import org.apache.tools.ant.types.FileSet; |
|
|
|
import org.junit.Assume; |
|
|
|
import org.junit.Before; |
|
|
|
import org.junit.Rule; |
|
|
|
import org.junit.Test; |
|
|
@@ -194,4 +196,16 @@ public class DependTest { |
|
|
|
.and(containsString("but has not been deleted because its source file could not be determined"))); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Tests that the depend task when run against a path containing a module-info.class (Java 9+ construct) |
|
|
|
* doesn't run into error |
|
|
|
*/ |
|
|
|
@Test |
|
|
|
public void testModuleInfo() { |
|
|
|
final JavaVersion atLeastJava9 = new JavaVersion(); |
|
|
|
atLeastJava9.setAtLeast("9"); |
|
|
|
Assume.assumeTrue("Skipping test execution since Java version is lesser than 9", atLeastJava9.eval()); |
|
|
|
buildRule.executeTarget("testmoduleinfo"); |
|
|
|
} |
|
|
|
|
|
|
|
} |