Methods Summary |
---|
public void | setUp()
configureProject("src/etc/testcases/taskdefs/zip.xml");
|
public void | tearDown()
try {
if ( zfPrefixAddsDir != null) {
zfPrefixAddsDir.close();
}
} catch (IOException e) {
//ignored
}
executeTarget("cleanup");
|
public void | test1()
expectBuildException("test1", "required argument not specified");
|
public void | test2()
expectBuildException("test2", "required argument not specified");
|
public void | test3()
expectBuildException("test3", "zip cannot include itself");
|
public void | test5()
executeTarget("test5");
|
public void | test6()
executeTarget("test6");
|
public void | test7()
executeTarget("test7");
|
public void | test8()
executeTarget("test8");
|
public void | testCompressionLevel()
executeTarget("testCompressionLevel");
|
public void | testDefaultExcludesAndUpdate()
executeTarget("testDefaultExcludesAndUpdate");
ZipFile f = null;
try {
f = new ZipFile(getProject().resolveFile("test3.zip"));
assertNotNull("ziptest~ should be included",
f.getEntry("ziptest~"));
} finally {
if (f != null) {
f.close();
}
}
|
public void | testEmptySkip()
executeTarget("testEmptySkip");
|
public void | testFileResource()
executeTarget("testFileResource");
|
public void | testFilesOnlyDoesntCauseRecreate()
executeTarget("testFilesOnlyDoesntCauseRecreateSetup");
long l = getProject().resolveFile("test3.zip").lastModified();
Thread.sleep(3000);
executeTarget("testFilesOnlyDoesntCauseRecreate");
assertEquals(l, getProject().resolveFile("test3.zip").lastModified());
|
public void | testNonFileResource()
executeTarget("testNonFileResource");
|
public void | testPrefixAddsDir()
executeTarget("testPrefixAddsDir");
File archive = getProject().resolveFile("test3.zip");
zfPrefixAddsDir = new ZipFile(archive);
ZipEntry ze = zfPrefixAddsDir.getEntry("test/");
assertNotNull("test/ has been added", ze);
|
public void | testTarFileSet()
executeTarget("testTarFileSet");
org.apache.tools.zip.ZipFile zf = null;
try {
zf = new org.apache.tools.zip.ZipFile(getProject()
.resolveFile("test3.zip"));
org.apache.tools.zip.ZipEntry ze = zf.getEntry("asf-logo.gif");
assertEquals(UnixStat.FILE_FLAG | 0446, ze.getUnixMode());
} finally {
if (zf != null) {
zf.close();
}
}
|
public void | testUpdateIsNecessary()
expectLogContaining("testUpdateIsNecessary", "Updating");
|
public void | testUpdateNotNecessary()
executeTarget("testUpdateNotNecessary");
assertEquals(-1, getLog().indexOf("Updating"));
|
public void | testZipEmptyCreate()
expectLogContaining("zipEmptyCreate", "Note: creating empty");
|
public void | testZipEmptyDir()
executeTarget("zipEmptyDir");
|
public void | testZipEmptyDirFilesOnly()
executeTarget("zipEmptyDirFilesOnly");
|
public void | testZipgroupfileset()
executeTarget("testZipgroupfileset");
ZipFile zipFile = new ZipFile(new File(getProjectDir(), "zipgroupfileset.zip"));
assertTrue(zipFile.getEntry("ant.xml") != null);
assertTrue(zipFile.getEntry("optional/jspc.xml") != null);
assertTrue(zipFile.getEntry("zip/zipgroupfileset3.zip") != null);
assertTrue(zipFile.getEntry("test6.mf") == null);
assertTrue(zipFile.getEntry("test7.mf") == null);
zipFile.close();
|