again, this time documenting the reason. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271603 13f79535-47bb-0310-9956-ffa450edef68master
@@ -219,7 +219,7 @@ a <code><path></code> with the id <code>path1</code>, but | |||||
new project using the id <code>path2</code>.</p> | new project using the id <code>path2</code>.</p> | ||||
<hr> | <hr> | ||||
<p align="center">Copyright © 2001 Apache Software Foundation. All rights | |||||
<p align="center">Copyright © 2001-2002 Apache Software Foundation. All rights | |||||
Reserved.</p> | Reserved.</p> | ||||
</body> | </body> | ||||
@@ -15,7 +15,7 @@ | |||||
</target> | </target> | ||||
<target name="test4"> | <target name="test4"> | ||||
<gzip src="gzip.xml" zipfile=""/> | |||||
<gzip src="gzip.xml" zipfile="." /> | |||||
</target> | </target> | ||||
<target name="realTest"> | <target name="realTest"> | ||||
@@ -83,11 +83,16 @@ public abstract class Pack extends Task { | |||||
} | } | ||||
private void validate() { | private void validate() { | ||||
if (zipFile == null || zipFile.getName().equals("")) { | |||||
if (zipFile == null) { | |||||
throw new BuildException("zipfile attribute is required", location); | throw new BuildException("zipfile attribute is required", location); | ||||
} | } | ||||
if (source == null || source.getName().equals("")) { | |||||
if (zipFile.isDirectory()) { | |||||
throw new BuildException("zipfile attribute must not " + | |||||
"represent a directory!", location); | |||||
} | |||||
if (source == null) { | |||||
throw new BuildException("src attribute is required", location); | throw new BuildException("src attribute is required", location); | ||||
} | } | ||||
@@ -82,11 +82,9 @@ public class GzipTest extends BuildFileTest { | |||||
expectBuildException("test3", "required argument missing"); | expectBuildException("test3", "required argument missing"); | ||||
} | } | ||||
/** Disable - how could that ever work? | |||||
public void test4() { | public void test4() { | ||||
expectBuildException("test4", "attribute zipfile invalid"); | |||||
expectBuildException("test4", "zipfile must not point to a directory"); | |||||
} | } | ||||
*/ | |||||
public void testGZip(){ | public void testGZip(){ | ||||
executeTarget("realTest"); | executeTarget("realTest"); | ||||