bodewig 2003/02/26 02:07:01
Modified: . Tag: ANT_15_BRANCH WHATSNEW src/etc/testcases/taskdefs Tag: ANT_15_BRANCH jar.xml src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH Zip.java src/testcases/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH JarTest.java Log: merge from HEAD Revision Changes Path No revision No revision 1.263.2.123 +1 -1 ant/WHATSNEW Index: WHATSNEW =================================================================== RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.263.2.122 retrieving revision 1.263.2.123 diff -u -r1.263.2.122 -r1.263.2.123 --- WHATSNEW 21 Feb 2003 15:54:20 -0000 1.263.2.122 +++ WHATSNEW 26 Feb 2003 10:07:00 -0000 1.263.2.123 @@ -87,7 +87,7 @@ * <uptodate> now works when using attributes (i.e. not filesets) and pointing to the same file -* Java task (and output system) now stores output which doos not end +* Java task (and output system) now stores output which does not end with a line feed. * splash screen wouldn't disappear when build was finished. No revision No revision 1.4.2.3 +21 -0 ant/src/etc/testcases/taskdefs/jar.xml Index: jar.xml =================================================================== RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/jar.xml,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.3 diff -u -r1.4.2.2 -r1.4.2.3 --- jar.xml 19 Feb 2003 08:13:58 -0000 1.4.2.2 +++ jar.xml 26 Feb 2003 10:07:00 -0000 1.4.2.3 @@ -5,6 +5,8 @@ <property name="tmp.jar" location="tmp.jar"/> <property name="tmp.dir" location="jartmp"/> <property name="tmp.zip" location="tmp.zip"/> + <property name="tmp1.dir" location="jartmp1"/> + <property name="tmp2.dir" location="jartmp2"/> <target name="test1"> <jar/> @@ -166,6 +168,25 @@ <delete file="${tmp.jar}" /> <delete dir="${tmp.dir}"/> <delete file="${tmp.zip}" /> + <delete dir="${tmp1.dir}"/> + <delete dir="${tmp2.dir}"/> + </target> + + <target name="testCreateWithEmptyFilesetSetUp"> + <mkdir dir="${tmp1.dir}"/> + <mkdir dir="${tmp2.dir}"/> + <echo file="${tmp2.dir}/foo.txt" message="foo"/> + </target> + + <target name="testCreateWithEmptyFileset"> + <jar destfile="${tmp.jar}"> + <fileset dir="${tmp1.dir}"> + <include name="**/*.doesNotExist"/> + </fileset> + <fileset dir="${tmp2.dir}"> + <include name="**/foo.txt"/> + </fileset> + </jar> </target> </project> No revision No revision 1.78.2.11 +1 -0 ant/src/main/org/apache/tools/ant/taskdefs/Zip.java Index: Zip.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v retrieving revision 1.78.2.10 retrieving revision 1.78.2.11 diff -u -r1.78.2.10 -r1.78.2.11 --- Zip.java 19 Feb 2003 08:13:59 -0000 1.78.2.10 +++ Zip.java 26 Feb 2003 10:07:00 -0000 1.78.2.11 @@ -729,6 +729,7 @@ for (int i = 0; i < filesets.length; i++) { if (initialResources[i].length == 0) { + newerResources[i] = new Resource[] {}; continue; } No revision No revision 1.8.2.5 +5 -0 ant/src/testcases/org/apache/tools/ant/taskdefs/JarTest.java Index: JarTest.java =================================================================== RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/JarTest.java,v retrieving revision 1.8.2.4 retrieving revision 1.8.2.5 diff -u -r1.8.2.4 -r1.8.2.5 --- JarTest.java 20 Feb 2003 17:21:43 -0000 1.8.2.4 +++ JarTest.java 26 Feb 2003 10:07:00 -0000 1.8.2.5 @@ -214,4 +214,9 @@ "testRecreateZipfilesetWithUpdateNewerFile"); } + public void testCreateWithEmptyFileset() { + executeTarget("testCreateWithEmptyFilesetSetUp"); + executeTarget("testCreateWithEmptyFileset"); + executeTarget("testCreateWithEmptyFileset"); + } }