bodewig 02/02/28 04:39:58
Modified: docs/manual/CoreTasks ant.html
src/etc/testcases/taskdefs gzip.xml
src/main/org/apache/tools/ant/taskdefs Pack.java
src/testcases/org/apache/tools/ant/taskdefs GzipTest.java
Log:
Now that we know why the test worked all these month, make it work
again, this time documenting the reason.
Revision Changes Path
1.13 +1 -1 jakarta-ant/docs/manual/CoreTasks/ant.html
Index: ant.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/ant.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ant.html 28 Feb 2002 07:58:46 -0000 1.12
+++ ant.html 28 Feb 2002 12:39:58 -0000 1.13
@@ -219,7 +219,7 @@
new project using the id <code>path2</code>.</p>
<hr>
-<p align="center">Copyright © 2001 Apache Software Foundation. All
rights
+<p align="center">Copyright © 2001-2002 Apache Software Foundation. All
rights
Reserved.</p>
</body>
1.7 +1 -1 jakarta-ant/src/etc/testcases/taskdefs/gzip.xml
Index: gzip.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/src/etc/testcases/taskdefs/gzip.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- gzip.xml 27 Feb 2002 09:00:18 -0000 1.6
+++ gzip.xml 28 Feb 2002 12:39:58 -0000 1.7
@@ -15,7 +15,7 @@
</target>
<target name="test4">
- <gzip src="gzip.xml" zipfile=""/>
+ <gzip src="gzip.xml" zipfile="." />
</target>
<target name="realTest">
1.5 +7 -2
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Pack.java
Index: Pack.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Pack.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Pack.java 27 Feb 2002 10:54:18 -0000 1.4
+++ Pack.java 28 Feb 2002 12:39:58 -0000 1.5
@@ -83,11 +83,16 @@
}
private void validate() {
- if (zipFile == null || zipFile.getName().equals("")) {
+ if (zipFile == null) {
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);
}
1.10 +1 -3
jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/GzipTest.java
Index: GzipTest.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/GzipTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- GzipTest.java 28 Feb 2002 07:43:10 -0000 1.9
+++ GzipTest.java 28 Feb 2002 12:39:58 -0000 1.10
@@ -82,11 +82,9 @@
expectBuildException("test3", "required argument missing");
}
- /** Disable - how could that ever work?
public void test4() {
- expectBuildException("test4", "attribute zipfile invalid");
+ expectBuildException("test4", "zipfile must not point to a
directory");
}
- */
public void testGZip(){
executeTarget("realTest");
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>