use of org.apache.tools.ant.types.FileSet in project ant-ivy by apache.
the class IvyBuildListTest method testOnMissingDescriptor.
@Test
public void testOnMissingDescriptor() {
FileSet fs = new FileSet();
fs.setDir(new File("test/buildlist"));
fs.setIncludes("**/build.xml");
fs.setExcludes("E2/build.xml,F/build.xml,G/build.xml");
buildlist.addFileset(fs);
// IVY-805: new String instance
buildlist.setOnMissingDescriptor("tail");
String[] files = getFiles(buildlist);
assertEquals(6, files.length);
assertListOfFiles("test/buildlist/", new String[] { "B", "C", "A", "D", "E", "H" }, files);
}
use of org.apache.tools.ant.types.FileSet in project ant-ivy by apache.
the class IvyBuildListTest method testOneParent.
@Test
public void testOneParent() {
FileSet fs = new FileSet();
fs.setDir(new File("test/buildlists/testOneParent"));
fs.setIncludes("**/build.xml");
buildlist.addFileset(fs);
buildlist.setOnMissingDescriptor("skip");
buildlist.setHaltonerror(false);
String[] files = getFiles(buildlist);
assertEquals(5, files.length);
assertListOfFiles("test/buildlists/testOneParent/", new String[] { "bootstrap-parent", "master-parent", "croatia", "ireland", "germany" }, files);
}
use of org.apache.tools.ant.types.FileSet in project ant-ivy by apache.
the class IvyBuildListTest method testWithRootCircular.
@Test
public void testWithRootCircular() {
FileSet fs = new FileSet();
fs.setDir(new File("test/buildlist"));
fs.setIncludes("**/build.xml");
buildlist.addFileset(fs);
buildlist.setRoot("F");
buildlist.setOnMissingDescriptor("skip");
String[] files = getFiles(buildlist);
// F and G should be in the list
assertEquals(2, files.length);
}
use of org.apache.tools.ant.types.FileSet in project ant-ivy by apache.
the class IvyBuildListTest method testReverse.
@Test
public void testReverse() {
FileSet fs = new FileSet();
fs.setDir(new File("test/buildlist"));
fs.setIncludes("**/build.xml");
fs.setExcludes("E2/build.xml,F/build.xml,G/build.xml");
buildlist.addFileset(fs);
buildlist.setReverse(true);
buildlist.setOnMissingDescriptor("skip");
String[] files = getFiles(buildlist);
assertEquals(5, files.length);
assertListOfFiles("test/buildlist/", new String[] { "E", "D", "A", "C", "B" }, files);
}
use of org.apache.tools.ant.types.FileSet in project ant-ivy by apache.
the class IvyBuildListTest method testWithRootExclude.
@Test
public void testWithRootExclude() {
FileSet fs = new FileSet();
fs.setDir(new File("test/buildlist"));
fs.setIncludes("**/build.xml");
fs.setExcludes("E2/**");
buildlist.addFileset(fs);
buildlist.setRoot("C");
buildlist.setExcludeRoot(true);
buildlist.setOnMissingDescriptor("skip");
String[] files = getFiles(buildlist);
// A, D and C should be filtered out
assertEquals(1, files.length);
assertListOfFiles("test/buildlist/", new String[] { "B" }, files);
}
Aggregations