git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1585684 13f79535-47bb-0310-9956-ffa450edef68master
@@ -17,48 +17,50 @@ | |||||
--> | --> | ||||
<project name="depend" basedir="." default="help"> | <project name="depend" basedir="." default="help"> | ||||
<import file="../../../buildfiletest-base.xml"/> | |||||
<target name="setUp"> | |||||
<mkdir dir="${output}" /> | |||||
<property name="tempsrc.dir" value="${output}/tempsrc.dir"/> | |||||
<property name="cache.dir" value="${output}/tempsrc.dir"/> | |||||
<property name="classes.dir" value="${output}/classes"/> | |||||
</target> | |||||
<property name="src1.dir" value="src1"/> | <property name="src1.dir" value="src1"/> | ||||
<property name="src2.dir" value="src2"/> | <property name="src2.dir" value="src2"/> | ||||
<property name="src3.dir" value="src3"/> | <property name="src3.dir" value="src3"/> | ||||
<property name="src4.dir" value="src4"/> | <property name="src4.dir" value="src4"/> | ||||
<property name="src5.dir" value="src5"/> | <property name="src5.dir" value="src5"/> | ||||
<property name="tempsrc.dir" value="working"/> | |||||
<property name="cache.dir" value="working"/> | |||||
<property name="classes.dir" value="classes"/> | |||||
<target name="help"> | <target name="help"> | ||||
<echo>This buildfile is used as part of Ant's test suite.</echo> | <echo>This buildfile is used as part of Ant's test suite.</echo> | ||||
</target> | </target> | ||||
<target name="basesetup" depends="clean"> | |||||
<mkdir dir="${tempsrc.dir}"/> | |||||
</target> | |||||
<target name="src1setup" depends="basesetup"> | |||||
<target name="src1setup" depends="setUp"> | |||||
<copy todir="${tempsrc.dir}"> | <copy todir="${tempsrc.dir}"> | ||||
<fileset dir="${src1.dir}"/> | <fileset dir="${src1.dir}"/> | ||||
</copy> | </copy> | ||||
</target> | </target> | ||||
<target name="src2setup" depends="basesetup"> | |||||
<target name="src2setup" depends="setUp"> | |||||
<copy todir="${tempsrc.dir}"> | <copy todir="${tempsrc.dir}"> | ||||
<fileset dir="${src2.dir}"/> | <fileset dir="${src2.dir}"/> | ||||
</copy> | </copy> | ||||
</target> | </target> | ||||
<target name="src3setup" depends="basesetup"> | |||||
<target name="src3setup" depends="setUp"> | |||||
<copy todir="${tempsrc.dir}"> | <copy todir="${tempsrc.dir}"> | ||||
<fileset dir="${src3.dir}"/> | <fileset dir="${src3.dir}"/> | ||||
</copy> | </copy> | ||||
</target> | </target> | ||||
<target name="src4setup" depends="basesetup"> | |||||
<target name="src4setup" depends="setUp"> | |||||
<copy todir="${tempsrc.dir}"> | <copy todir="${tempsrc.dir}"> | ||||
<fileset dir="${src4.dir}"/> | <fileset dir="${src4.dir}"/> | ||||
</copy> | </copy> | ||||
</target> | </target> | ||||
<target name="src5setup" depends="basesetup"> | |||||
<target name="src5setup" depends="setUp"> | |||||
<copy todir="${tempsrc.dir}"> | <copy todir="${tempsrc.dir}"> | ||||
<fileset dir="${src5.dir}"/> | <fileset dir="${src5.dir}"/> | ||||
</copy> | </copy> | ||||
@@ -69,11 +71,6 @@ | |||||
<javac srcdir="${tempsrc.dir}" destdir="${classes.dir}"/> | <javac srcdir="${tempsrc.dir}" destdir="${classes.dir}"/> | ||||
</target> | </target> | ||||
<target name="clean"> | |||||
<delete dir="${classes.dir}"/> | |||||
<delete dir="${tempsrc.dir}"/> | |||||
</target> | |||||
<target name="testdirect" depends="src1setup, compile"> | <target name="testdirect" depends="src1setup, compile"> | ||||
<sleep seconds="3"/> | <sleep seconds="3"/> | ||||
<delete file="${tempsrc.dir}/C.java"/> | <delete file="${tempsrc.dir}/C.java"/> | ||||
@@ -16,30 +16,29 @@ | |||||
limitations under the License. | limitations under the License. | ||||
--> | --> | ||||
<project name="translate-test" default="test1" basedir="."> | <project name="translate-test" default="test1" basedir="."> | ||||
<property name="input.dir" value="input"/> | |||||
<property name="output.dir" value="output"/> | |||||
<property name="expected.dir" value="expected"/> | |||||
<target name="setup"> | |||||
<mkdir dir="${output.dir}/de"/> | |||||
</target> | |||||
<target name="test1" depends="setup"> | |||||
<translate toDir="${output.dir}/de" | |||||
starttoken="@" | |||||
endtoken="@" | |||||
bundle="${input.dir}/resources" | |||||
bundlecountry="DE" | |||||
bundlelanguage="ger" | |||||
forceoverwrite="yes" | |||||
srcencoding="ISO8859_1" | |||||
destencoding="ISO8859_1" | |||||
bundleencoding="Cp1252"> | |||||
<fileset dir="${input.dir}"> | |||||
<include name="template.txt"/> | |||||
</fileset> | |||||
</translate> | |||||
</target> | |||||
<target name="cleanup"> | |||||
<delete dir="${output.dir}" quiet="true"/> | |||||
</target> | |||||
<property name="input.dir" value="input"/> | |||||
<property name="expected.dir" value="expected"/> | |||||
<import file="../../../../buildfiletest-base.xml"/> | |||||
<target name="setUp"> | |||||
<mkdir dir="${output}/de"/> | |||||
</target> | |||||
<target name="test1" depends="setUp"> | |||||
<translate toDir="${output}/de" | |||||
starttoken="@" | |||||
endtoken="@" | |||||
bundle="${input.dir}/resources" | |||||
bundlecountry="DE" | |||||
bundlelanguage="ger" | |||||
forceoverwrite="yes" | |||||
srcencoding="ISO8859_1" | |||||
destencoding="ISO8859_1" | |||||
bundleencoding="Cp1252"> | |||||
<fileset dir="${input.dir}"> | |||||
<include name="template.txt"/> | |||||
</fileset> | |||||
</translate> | |||||
</target> | |||||
</project> | </project> | ||||
@@ -18,59 +18,56 @@ | |||||
<project name="image-test" default="main" basedir="."> | <project name="image-test" default="main" basedir="."> | ||||
<target name="main" depends="testSimpleScale"> | |||||
</target> | |||||
<import file="../../../buildfiletest-base.xml"/> | |||||
<target name="init"> | |||||
<property name="src.dir" location="${basedir}/src"/> | |||||
<property name="dest.dir" location="${basedir}/dest"/> | |||||
<mkdir dir="${dest.dir}"/> | |||||
</target> | |||||
<target name="cleanup"> | |||||
<delete dir="${dest.dir}"/> | |||||
</target> | |||||
<!-- this should produce a single file in the dest dir --> | |||||
<target name="testSimpleScale" depends="init"> | |||||
<image includes="*.jpg" srcdir="${src.dir}" destdir="${dest.dir}" overwrite="no" failonerror="no"> | |||||
<scale width="300" proportions="width"/> | |||||
</image> | |||||
</target> | |||||
<target name="setUp"> | |||||
<mkdir dir="${output}"/> | |||||
<property name="src.dir" location="${basedir}/src"/> | |||||
</target> | |||||
<!-- this should put some text in the log --> | |||||
<target name="testEchoToLog" depends="init"> | |||||
<image includes="*.jpg" srcdir="${src.dir}" destdir="${dest.dir}" overwrite="no" failonerror="no"> | |||||
<scale width="300" proportions="width"/> | |||||
</image> | |||||
</target> | |||||
<!-- this should produce a single file in the dest dir --> | |||||
<target name="testFailOnError" depends="init"> | |||||
<image includes="*.jpg" srcdir="${src.dir}" destdir="${dest.dir}" overwrite="no" failonerror="yes"> | |||||
<scale width="300" proportions="width"/> | |||||
</image> | |||||
</target> | |||||
<!-- this should produce a single file in the dest dir, overwriting any existing file --> | |||||
<target name="testOverwriteTrue" depends="init"> | |||||
<image includes="*.jpg" srcdir="${src.dir}" destdir="${dest.dir}" overwrite="true" failonerror="no"> | |||||
<scale width="300" proportions="width"/> | |||||
</image> | |||||
</target> | |||||
<target name="main" depends="testSimpleScale"> | |||||
</target> | |||||
<!-- this should not overwrite the existing file --> | |||||
<target name="testOverwriteFalse" depends="init"> | |||||
<image includes="*.jpg" srcdir="${src.dir}" destdir="${dest.dir}" overwrite="false" failonerror="no"> | |||||
<scale width="300" proportions="width"/> | |||||
</image> | |||||
</target> | |||||
<target name="testSimpleScaleWithMapper" depends="init"> | |||||
<!-- this should produce a single file in the dest dir --> | |||||
<target name="testSimpleScale" depends="setUp"> | |||||
<image includes="*.jpg" srcdir="${src.dir}" destdir="${output}" overwrite="no" failonerror="no"> | |||||
<scale width="300" proportions="width"/> | |||||
</image> | |||||
</target> | |||||
<!-- this should put some text in the log --> | |||||
<target name="testEchoToLog" depends="setUp"> | |||||
<image includes="*.jpg" srcdir="${src.dir}" destdir="${output}" overwrite="no" failonerror="no"> | |||||
<scale width="300" proportions="width"/> | |||||
</image> | |||||
</target> | |||||
<!-- this should produce a single file in the dest dir --> | |||||
<target name="testFailOnError" depends="setUp"> | |||||
<image includes="*.jpg" srcdir="${src.dir}" destdir="${output}" overwrite="no" failonerror="yes"> | |||||
<scale width="300" proportions="width"/> | |||||
</image> | |||||
</target> | |||||
<!-- this should produce a single file in the dest dir, overwriting any existing file --> | |||||
<target name="testOverwriteTrue" depends="setUp"> | |||||
<image includes="*.jpg" srcdir="${src.dir}" destdir="${output}" overwrite="true" failonerror="no"> | |||||
<scale width="300" proportions="width"/> | |||||
</image> | |||||
</target> | |||||
<!-- this should not overwrite the existing file --> | |||||
<target name="testOverwriteFalse" depends="setUp"> | |||||
<image includes="*.jpg" srcdir="${src.dir}" destdir="${output}" overwrite="false" failonerror="no"> | |||||
<scale width="300" proportions="width"/> | |||||
</image> | |||||
</target> | |||||
<target name="testSimpleScaleWithMapper" depends="setUp"> | |||||
<image includes="*.jpg" srcdir="${src.dir}" | <image includes="*.jpg" srcdir="${src.dir}" | ||||
destdir="${dest.dir}" overwrite="no" failonerror="no"> | |||||
destdir="${output}" overwrite="no" failonerror="no"> | |||||
<scale width="300" proportions="width"/> | <scale width="300" proportions="width"/> | ||||
<globmapper from="*" to="scaled-*"/> | <globmapper from="*" to="scaled-*"/> | ||||
</image> | |||||
</target> | |||||
</image> | |||||
</target> | |||||
</project> | </project> |
@@ -46,31 +46,31 @@ | |||||
<property name="delay" value="3"/> | <property name="delay" value="3"/> | ||||
<property name="tdir" value="${basedir}/test-working"/> | |||||
<import file="../../../buildfiletest-base.xml"/> | |||||
<target name="setup"> | |||||
<delete dir="${tdir}"/> | |||||
<mkdir dir="${tdir}"/> | |||||
<target name="setUp"> | |||||
<mkdir dir="${output}" /> | |||||
</target> | </target> | ||||
<target name="all" | <target name="all" | ||||
depends="setup, test-single, test-delete, test-record, test-recreate, teardown"/> | |||||
depends="setUp, test-single, test-delete, test-record, test-recreate, tearDown"/> | |||||
<!-- test for action = single --> | <!-- test for action = single --> | ||||
<!-- | <!-- | ||||
Creates: | Creates: | ||||
File: ${tdir}/symlink.test | |||||
Link: ${tdir}/singletest | |||||
File: ${output}/symlink.test | |||||
Link: ${output}/singletest | |||||
--> | --> | ||||
<target name="test-single"> | <target name="test-single"> | ||||
<touch file="${tdir}/symlink.test"/> | |||||
<symlink resource="${tdir}/symlink.test" | |||||
link="${tdir}/singletest" | |||||
<touch file="${output}/symlink.test"/> | |||||
<symlink resource="${output}/symlink.test" | |||||
link="${output}/singletest" | |||||
failonerror="yes"/> | failonerror="yes"/> | ||||
<sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | ||||
<available file="${tdir}/symlink.test" | |||||
<available file="${output}/symlink.test" | |||||
property="test.single.file.created"/> | property="test.single.file.created"/> | ||||
<available file="${tdir}/singletest" | |||||
<available file="${output}/singletest" | |||||
property="test.single.link.created"/> | property="test.single.link.created"/> | ||||
</target> | </target> | ||||
@@ -82,23 +82,23 @@ | |||||
Creates: | Creates: | ||||
(none) | (none) | ||||
Deletes: | Deletes: | ||||
Link: ${tdir}/singletest | |||||
Link: ${output}/singletest | |||||
--> | --> | ||||
<target name="test-delete"> | <target name="test-delete"> | ||||
<touch file="${tdir}/symlink.test"/> | |||||
<symlink resource="${tdir}/symlink.test" | |||||
link="${tdir}/singletest" | |||||
<touch file="${output}/symlink.test"/> | |||||
<symlink resource="${output}/symlink.test" | |||||
link="${output}/singletest" | |||||
failonerror="yes"/> | failonerror="yes"/> | ||||
<sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | ||||
<symlink action="delete" link="${tdir}/singletest" failonerror="yes"/> | |||||
<symlink action="delete" link="${tdir}/symlink.test" failonerror="no"/> | |||||
<symlink action="delete" link="${output}/singletest" failonerror="yes"/> | |||||
<symlink action="delete" link="${output}/symlink.test" failonerror="no"/> | |||||
<sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | ||||
<available file="${tdir}/symlink.test" | |||||
<available file="${output}/symlink.test" | |||||
property="test.delete.file.still.there"/> | property="test.delete.file.still.there"/> | ||||
<available file="${tdir}/singletest" | |||||
<available file="${output}/singletest" | |||||
property="test.delete.link.still.there" | property="test.delete.link.still.there" | ||||
value="ERROR: link deletion failed"/> | value="ERROR: link deletion failed"/> | ||||
@@ -110,127 +110,127 @@ | |||||
<!-- | <!-- | ||||
Creates: | Creates: | ||||
Dir: ${tdir}/symtest1 | |||||
Dir: ${tdir}/symtest1/symtest2 | |||||
Dir: ${tdir}/symtest1/symtest3 | |||||
File: ${tdir}/symtest1/file1 | |||||
File: ${tdir}/symtest1/symtest2/file2 | |||||
File: ${tdir}/symtest1/symtest3/fileA | |||||
File: ${tdir}/symtest1/symtest3/fileB | |||||
File: ${tdir}/symtest1/symtest3/fileC | |||||
Link: ${tdir}/symtest1/link1==>${tdir}/symtest1/file1 | |||||
Link: ${tdir}/symtest1/link2==>${tdir}/symtest1/symtest2/file2 | |||||
Link: ${tdir}/symtest1/symtest2/link3==> | |||||
${tdir}/symtest1/symtest2/file2 | |||||
Link: ${tdir}/symtest1/dirlink==>${tdir}/symtest1/symtest3 | |||||
Link: ${tdir}/symtest1/dirlink2==>${tdir}/symtest1/symtest3 | |||||
Link: ${tdir}/symtest1/dirlink3==>${tdir}/symtest1/symtest3 | |||||
File: ${tdir}/symtest1/recorded.links | |||||
File: ${tdir}/symtest1/symtest2/recorded.links | |||||
Dir: ${output}/symtest1 | |||||
Dir: ${output}/symtest1/symtest2 | |||||
Dir: ${output}/symtest1/symtest3 | |||||
File: ${output}/symtest1/file1 | |||||
File: ${output}/symtest1/symtest2/file2 | |||||
File: ${output}/symtest1/symtest3/fileA | |||||
File: ${output}/symtest1/symtest3/fileB | |||||
File: ${output}/symtest1/symtest3/fileC | |||||
Link: ${output}/symtest1/link1==>${output}/symtest1/file1 | |||||
Link: ${output}/symtest1/link2==>${output}/symtest1/symtest2/file2 | |||||
Link: ${output}/symtest1/symtest2/link3==> | |||||
${output}/symtest1/symtest2/file2 | |||||
Link: ${output}/symtest1/dirlink==>${output}/symtest1/symtest3 | |||||
Link: ${output}/symtest1/dirlink2==>${output}/symtest1/symtest3 | |||||
Link: ${output}/symtest1/dirlink3==>${output}/symtest1/symtest3 | |||||
File: ${output}/symtest1/recorded.links | |||||
File: ${output}/symtest1/symtest2/recorded.links | |||||
Deletes: | Deletes: | ||||
(none) | (none) | ||||
--> | --> | ||||
<target name="test-record"> | <target name="test-record"> | ||||
<mkdir dir="${tdir}/symtest1"/> | |||||
<mkdir dir="${tdir}/symtest1/symtest2"/> | |||||
<mkdir dir="${tdir}/symtest1/symtest3"/> | |||||
<touch file="${tdir}/symtest1/file1"/> | |||||
<touch file="${tdir}/symtest1/symtest2/file2"/> | |||||
<mkdir dir="${output}/symtest1"/> | |||||
<mkdir dir="${output}/symtest1/symtest2"/> | |||||
<mkdir dir="${output}/symtest1/symtest3"/> | |||||
<touch file="${output}/symtest1/file1"/> | |||||
<touch file="${output}/symtest1/symtest2/file2"/> | |||||
<touch file="${tdir}/symtest1/symtest3/fileA"/> | |||||
<touch file="${tdir}/symtest1/symtest3/fileB"/> | |||||
<touch file="${tdir}/symtest1/symtest3/fileC"/> | |||||
<touch file="${output}/symtest1/symtest3/fileA"/> | |||||
<touch file="${output}/symtest1/symtest3/fileB"/> | |||||
<touch file="${output}/symtest1/symtest3/fileC"/> | |||||
<symlink resource="${tdir}/symtest1/file1" | |||||
link="${tdir}/symtest1/link1" | |||||
<symlink resource="${output}/symtest1/file1" | |||||
link="${output}/symtest1/link1" | |||||
failonerror="no" /> | failonerror="no" /> | ||||
<symlink resource="${tdir}/symtest1/symtest2/file2" | |||||
link="${tdir}/symtest1/link2" | |||||
<symlink resource="${output}/symtest1/symtest2/file2" | |||||
link="${output}/symtest1/link2" | |||||
failonerror="no" /> | failonerror="no" /> | ||||
<symlink resource="${tdir}/symtest1/symtest2/file2" | |||||
link="${tdir}/symtest1/symtest2/link3" | |||||
<symlink resource="${output}/symtest1/symtest2/file2" | |||||
link="${output}/symtest1/symtest2/link3" | |||||
failonerror="no" /> | failonerror="no" /> | ||||
<symlink resource="${tdir}/symtest1/symtest3" | |||||
link="${tdir}/symtest1/dirlink" | |||||
<symlink resource="${output}/symtest1/symtest3" | |||||
link="${output}/symtest1/dirlink" | |||||
failonerror="no" /> | failonerror="no" /> | ||||
<symlink resource="${tdir}/symtest1/symtest3" | |||||
link="${tdir}/symtest1/dirlink2" | |||||
<symlink resource="${output}/symtest1/symtest3" | |||||
link="${output}/symtest1/dirlink2" | |||||
failonerror="no"/> | failonerror="no"/> | ||||
<symlink resource="${tdir}/symtest1/symtest3" | |||||
link="${tdir}/symtest1/dirlink3" | |||||
<symlink resource="${output}/symtest1/symtest3" | |||||
link="${output}/symtest1/dirlink3" | |||||
failonerror="no"/> | failonerror="no"/> | ||||
<sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | ||||
<symlink action="record" linkfilename="recorded.links"> | <symlink action="record" linkfilename="recorded.links"> | ||||
<fileset dir="${tdir}/symtest1" includes="**/**"/> | |||||
<fileset dir="${output}/symtest1" includes="**/**"/> | |||||
</symlink> | </symlink> | ||||
<sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | ||||
<!-- Test to see if the directories were created --> | <!-- Test to see if the directories were created --> | ||||
<available file="${tdir}/symtest1" | |||||
<available file="${output}/symtest1" | |||||
type="dir" | type="dir" | ||||
property="test.record.dir1.created"/> | property="test.record.dir1.created"/> | ||||
<available file="${tdir}/symtest1/symtest2" | |||||
<available file="${output}/symtest1/symtest2" | |||||
type="dir" | type="dir" | ||||
property="test.record.dir2.created"/> | property="test.record.dir2.created"/> | ||||
<available file="${tdir}/symtest1/symtest3" | |||||
<available file="${output}/symtest1/symtest3" | |||||
type="dir" | type="dir" | ||||
property="test.record.dir3.created"/> | property="test.record.dir3.created"/> | ||||
<!-- Test to see if the Files were created --> | <!-- Test to see if the Files were created --> | ||||
<available file="${tdir}/symtest1/file1" | |||||
<available file="${output}/symtest1/file1" | |||||
property="test.record.file1.created"/> | property="test.record.file1.created"/> | ||||
<available file="${tdir}/symtest1/symtest2/file2" | |||||
<available file="${output}/symtest1/symtest2/file2" | |||||
property="test.record.file2.created"/> | property="test.record.file2.created"/> | ||||
<available file="${tdir}/symtest1/symtest3/fileA" | |||||
<available file="${output}/symtest1/symtest3/fileA" | |||||
property="test.record.fileA.created"/> | property="test.record.fileA.created"/> | ||||
<available file="${tdir}/symtest1/symtest3/fileB" | |||||
<available file="${output}/symtest1/symtest3/fileB" | |||||
property="test.record.fileB.created"/> | property="test.record.fileB.created"/> | ||||
<available file="${tdir}/symtest1/symtest3/fileC" | |||||
<available file="${output}/symtest1/symtest3/fileC" | |||||
property="test.record.fileC.created"/> | property="test.record.fileC.created"/> | ||||
<!-- Test to see if the links were created --> | <!-- Test to see if the links were created --> | ||||
<available file="${tdir}/symtest1/link1" | |||||
<available file="${output}/symtest1/link1" | |||||
property="test.record.link1.created"/> | property="test.record.link1.created"/> | ||||
<available file="${tdir}/symtest1/link2" | |||||
<available file="${output}/symtest1/link2" | |||||
property="test.record.link2.created"/> | property="test.record.link2.created"/> | ||||
<available file="${tdir}/symtest1/symtest2/link3" | |||||
<available file="${output}/symtest1/symtest2/link3" | |||||
property="test.record.link3.created"/> | property="test.record.link3.created"/> | ||||
<available file="${tdir}/symtest1/dirlink" | |||||
<available file="${output}/symtest1/dirlink" | |||||
property="test.record.dirlink.created"/> | property="test.record.dirlink.created"/> | ||||
<!-- this is redundant for this test, but used in the recreate test --> | <!-- this is redundant for this test, but used in the recreate test --> | ||||
<available file="${tdir}/symtest1/dirlink2" | |||||
<available file="${output}/symtest1/dirlink2" | |||||
property="test.record.dirlink2.created"/> | property="test.record.dirlink2.created"/> | ||||
<!-- Test to see if the linkfiles were created --> | <!-- Test to see if the linkfiles were created --> | ||||
<available file="${tdir}/symtest1/recorded.links" | |||||
<available file="${output}/symtest1/recorded.links" | |||||
property="test.record.dir1.recorded"/> | property="test.record.dir1.recorded"/> | ||||
<available file="${tdir}/symtest1/symtest2/recorded.links" | |||||
<available file="${output}/symtest1/symtest2/recorded.links" | |||||
property="test.record.dir2.recorded"/> | property="test.record.dir2.recorded"/> | ||||
<!-- THIS should not be set --> | <!-- THIS should not be set --> | ||||
<available file="${tdir}/symtest1/symtest3/recorded.links" | |||||
<available file="${output}/symtest1/symtest3/recorded.links" | |||||
property="test.record.dir3.recorded" | property="test.record.dir3.recorded" | ||||
value="ERROR: symtest3/recorded.links should not exist"/> | value="ERROR: symtest3/recorded.links should not exist"/> | ||||
@@ -241,95 +241,95 @@ | |||||
<!-- | <!-- | ||||
Deletes: | Deletes: | ||||
Link: ${tdir}/symtest1/link1==>${tdir}/symtest1/file1 | |||||
Link: ${tdir}/symtest1/link2==>${tdir}/symtest1/symtest2/file2 | |||||
Link: ${tdir}/symtest1/symtest2/link3==> | |||||
${tdir}/symtest1/symtest2/file2 | |||||
Link: ${tdir}/symtest1/dirlink==>${tdir}/symtest1/symtest3 | |||||
Link: ${tdir}/symtest1/dirlink3==>${tdir}/symtest1/symtest3 | |||||
Link: ${output}/symtest1/link1==>${output}/symtest1/file1 | |||||
Link: ${output}/symtest1/link2==>${output}/symtest1/symtest2/file2 | |||||
Link: ${output}/symtest1/symtest2/link3==> | |||||
${output}/symtest1/symtest2/file2 | |||||
Link: ${output}/symtest1/dirlink==>${output}/symtest1/symtest3 | |||||
Link: ${output}/symtest1/dirlink3==>${output}/symtest1/symtest3 | |||||
Creates | Creates | ||||
Link: ${tdir}/symtest1/dirlink3==>${tdir}/symtest1/symtest2 | |||||
Link: ${output}/symtest1/dirlink3==>${output}/symtest1/symtest2 | |||||
Recreates: | Recreates: | ||||
Link: ${tdir}/symtest1/link1==>${tdir}/symtest1/file1 | |||||
Link: ${tdir}/symtest1/link2==>${tdir}/symtest1/symtest2/file2 | |||||
Link: ${tdir}/symtest1/symtest2/link3==> | |||||
${tdir}/symtest1/symtest2/file2 | |||||
Link: ${tdir}/symtest1/dirlink==>${tdir}/symtest1/symtest3 | |||||
Link: ${output}/symtest1/link1==>${output}/symtest1/file1 | |||||
Link: ${output}/symtest1/link2==>${output}/symtest1/symtest2/file2 | |||||
Link: ${output}/symtest1/symtest2/link3==> | |||||
${output}/symtest1/symtest2/file2 | |||||
Link: ${output}/symtest1/dirlink==>${output}/symtest1/symtest3 | |||||
Should Change: | Should Change: | ||||
Link: ${tdir}/symtest1/dirlink3==>${tdir}/symtest1/symtest2 | |||||
Link: ${output}/symtest1/dirlink3==>${output}/symtest1/symtest2 | |||||
to | to | ||||
${tdir}/symtest1/dirlink3==>${tdir}/symtest1/symtest3 | |||||
${output}/symtest1/dirlink3==>${output}/symtest1/symtest3 | |||||
Should Not Create (bug 25181): | Should Not Create (bug 25181): | ||||
Link: ${tdir}/symtest1/symtest3/dirlink2==>${tdir}/symtest1/symtest3 | |||||
Link: ${output}/symtest1/symtest3/dirlink2==>${output}/symtest1/symtest3 | |||||
--> | --> | ||||
<target name="test-recreate" depends="test-record"> | <target name="test-recreate" depends="test-record"> | ||||
<symlink action="delete" link="${tdir}/symtest1/link1"/> | |||||
<symlink action="delete" link="${tdir}/symtest1/link2"/> | |||||
<symlink action="delete" link="${tdir}/symtest1/symtest2/link3"/> | |||||
<symlink action="delete" link="${tdir}/symtest1/dirlink"/> | |||||
<symlink action="delete" link="${output}/symtest1/link1"/> | |||||
<symlink action="delete" link="${output}/symtest1/link2"/> | |||||
<symlink action="delete" link="${output}/symtest1/symtest2/link3"/> | |||||
<symlink action="delete" link="${output}/symtest1/dirlink"/> | |||||
<!-- dirlink2 intentionally not deleted to test bug 25181 --> | <!-- dirlink2 intentionally not deleted to test bug 25181 --> | ||||
<symlink action="delete" link="${tdir}/symtest1/dirlink3"/> | |||||
<symlink action="delete" link="${output}/symtest1/dirlink3"/> | |||||
<sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | ||||
<symlink resource="${tdir}/symtest1/symtest2" | |||||
link="${tdir}/symtest1/dirlink3" | |||||
<symlink resource="${output}/symtest1/symtest2" | |||||
link="${output}/symtest1/dirlink3" | |||||
failonerror="no"/> | failonerror="no"/> | ||||
<sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | ||||
<available file="${tdir}/symtest1/link1" | |||||
<available file="${output}/symtest1/link1" | |||||
property="test.recreate.link1.not.removed" | property="test.recreate.link1.not.removed" | ||||
value="ERROR: rm -f symtest1/link1 failed"/> | value="ERROR: rm -f symtest1/link1 failed"/> | ||||
<available file="${tdir}/symtest1/link2" | |||||
<available file="${output}/symtest1/link2" | |||||
property="test.recreate.link2.not.removed" | property="test.recreate.link2.not.removed" | ||||
value="ERROR: rm -f symtest1/link2 failed"/> | value="ERROR: rm -f symtest1/link2 failed"/> | ||||
<available file="${tdir}/symtest1/symtest2/link3" | |||||
<available file="${output}/symtest1/symtest2/link3" | |||||
property="test.recreate.link3.not.removed" | property="test.recreate.link3.not.removed" | ||||
value="ERROR: rm -f symtest1/symtest2/link3 failed"/> | value="ERROR: rm -f symtest1/symtest2/link3 failed"/> | ||||
<available file="${tdir}/symtest1/zdirlink" | |||||
<available file="${output}/symtest1/zdirlink" | |||||
property="test.recreate.zdirlink.not.removed" | property="test.recreate.zdirlink.not.removed" | ||||
value="ERROR: rm -f symtest1/zdirlink failed"/> | value="ERROR: rm -f symtest1/zdirlink failed"/> | ||||
<sleep seconds="${delay}"/> <!-- make sure OS has time to do the execs --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to do the execs --> | ||||
<symlink action="recreate"> | <symlink action="recreate"> | ||||
<fileset dir="${tdir}/symtest1" includes="**/recorded.links"/> | |||||
<fileset dir="${output}/symtest1" includes="**/recorded.links"/> | |||||
</symlink> | </symlink> | ||||
<sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | ||||
<available file="${tdir}/symtest1/link1" | |||||
<available file="${output}/symtest1/link1" | |||||
property="test.recreate.link1.recreated"/> | property="test.recreate.link1.recreated"/> | ||||
<available file="${tdir}/symtest1/link2" | |||||
<available file="${output}/symtest1/link2" | |||||
property="test.recreate.link2.recreated"/> | property="test.recreate.link2.recreated"/> | ||||
<available file="${tdir}/symtest1/symtest2/link3" | |||||
<available file="${output}/symtest1/symtest2/link3" | |||||
property="test.recreate.link3.recreated"/> | property="test.recreate.link3.recreated"/> | ||||
<available file="${tdir}/symtest1/dirlink" | |||||
<available file="${output}/symtest1/dirlink" | |||||
property="test.recreate.dirlink.recreated"/> | property="test.recreate.dirlink.recreated"/> | ||||
<!-- this should not get set --> | <!-- this should not get set --> | ||||
<available file="${tdir}/symtest1/symtest3/symtest3" | |||||
<available file="${output}/symtest1/symtest3/symtest3" | |||||
property="test.recreate.dirlink2.recreated.twice" | property="test.recreate.dirlink2.recreated.twice" | ||||
value="ERROR: dirlink2 was created a second time (bug 25181)"/> | value="ERROR: dirlink2 was created a second time (bug 25181)"/> | ||||
<touch file="${tdir}/symtest1/dirlink3/WhereAmI"/> | |||||
<touch file="${output}/symtest1/dirlink3/WhereAmI"/> | |||||
<sleep seconds="${delay}"/> <!-- make sure OS has time to do the execs --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to do the execs --> | ||||
<available file="${tdir}/symtest1/symtest3/WhereAmI" | |||||
<available file="${output}/symtest1/symtest3/WhereAmI" | |||||
property="test.recreate.dirlink3.was.altered"/> | property="test.recreate.dirlink3.was.altered"/> | ||||
</target> | </target> | ||||
@@ -337,23 +337,18 @@ | |||||
<!-- actually tests the symlink methods in FileUtils, but this | <!-- actually tests the symlink methods in FileUtils, but this | ||||
testfixture already has all the necessary envirnment in place | testfixture already has all the necessary envirnment in place | ||||
--> | --> | ||||
<target name="test-fileutils" depends="setup"> | |||||
<mkdir dir="${tdir}/dir1"/> | |||||
<mkdir dir="${tdir}/dir2"/> | |||||
<touch file="${tdir}/file1"/> | |||||
<touch file="${tdir}/file2"/> | |||||
<symlink link="${tdir}/dir.there" resource="${tdir}/dir1"/> | |||||
<symlink link="${tdir}/dir.notthere" resource="${tdir}/dir2"/> | |||||
<symlink link="${tdir}/file.there" resource="${tdir}/file1"/> | |||||
<symlink link="${tdir}/file.notthere" resource="${tdir}/file2"/> | |||||
<delete dir="${tdir}/dir2"/> | |||||
<delete file="${tdir}/file2"/> | |||||
<target name="test-fileutils" depends="setUp"> | |||||
<mkdir dir="${output}/dir1"/> | |||||
<mkdir dir="${output}/dir2"/> | |||||
<touch file="${output}/file1"/> | |||||
<touch file="${output}/file2"/> | |||||
<symlink link="${output}/dir.there" resource="${output}/dir1"/> | |||||
<symlink link="${output}/dir.notthere" resource="${output}/dir2"/> | |||||
<symlink link="${output}/file.there" resource="${output}/file1"/> | |||||
<symlink link="${output}/file.notthere" resource="${output}/file2"/> | |||||
<delete dir="${output}/dir2"/> | |||||
<delete file="${output}/file2"/> | |||||
</target> | </target> | ||||
<!-- CALL THIS to clean things up afterwards --> | |||||
<target name="teardown"> | |||||
<delete dir="${tdir}"/> | |||||
</target> | |||||
</project> | </project> |
@@ -15,20 +15,23 @@ | |||||
See the License for the specific language governing permissions and | See the License for the specific language governing permissions and | ||||
limitations under the License. | limitations under the License. | ||||
--> | --> | ||||
<project name="rmic" default="teardown" basedir="."> | |||||
<project name="rmic" default="tearDown" basedir="."> | |||||
<property name="rmic.dir" location="." /> | <property name="rmic.dir" location="." /> | ||||
<property name="src.dir" location="${rmic.dir}/src"/> | <property name="src.dir" location="${rmic.dir}/src"/> | ||||
<property name="build.dir" location="${java.io.tmpdir}/build"/> | |||||
<property name="dest.dir" location="${java.io.tmpdir}/dest"/> | |||||
<target name="teardown"> | |||||
<delete dir="${build.dir}"/> | |||||
<delete dir="${dest.dir}"/> | |||||
<import file="../../buildfiletest-base.xml"/> | |||||
<target name="setUp"> | |||||
<mkdir dir="${output}" /> | |||||
<property name="build.dir" location="${output}/build"/> | |||||
<property name="dest.dir" location="${output}/dest"/> | |||||
</target> | </target> | ||||
<!-- init builds the java source --> | <!-- init builds the java source --> | ||||
<target name="init" depends="probe-rmic"> | |||||
<target name="init" depends="probe-rmic,setUp"> | |||||
<mkdir dir="${build.dir}"/> | <mkdir dir="${build.dir}"/> | ||||
<mkdir dir="${dest.dir}"/> | <mkdir dir="${dest.dir}"/> | ||||
@@ -16,59 +16,55 @@ | |||||
limitations under the License. | limitations under the License. | ||||
--> | --> | ||||
<project name="xslt-test" basedir="." default="nothing"> | |||||
<project name="xslt-test" basedir="." default="tearDown"> | |||||
<property name="out.dir" value="out"/> | |||||
<import file="../../buildfiletest-base.xml"/> | |||||
<target name="setup"> | |||||
<target name="setUp"> | |||||
<mkdir dir="${output}" /> | |||||
</target> | </target> | ||||
<target name="teardown"> | |||||
<delete dir="${out.dir}" failonerror="false" /> | |||||
</target> | |||||
<target name="testStyleIsSet"> | <target name="testStyleIsSet"> | ||||
<xslt in="data.xml" out="${out.dir}/out.xml"/> | |||||
<xslt in="data.xml" out="${output}/out.xml"/> | |||||
</target> | </target> | ||||
<target name="testTransferParameterSet"> | <target name="testTransferParameterSet"> | ||||
<property name="value" value="myvalue"/> | <property name="value" value="myvalue"/> | ||||
<xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||||
<xslt in="data.xml" out="${output}/out.xml" style="printParams.xsl"> | |||||
<param name="set" expression="${value}"/> | <param name="set" expression="${value}"/> | ||||
</xslt> | </xslt> | ||||
</target> | </target> | ||||
<target name="testTransferParameterEmpty"> | <target name="testTransferParameterEmpty"> | ||||
<property name="value" value=""/> | <property name="value" value=""/> | ||||
<xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||||
<xslt in="data.xml" out="${output}/out.xml" style="printParams.xsl"> | |||||
<param name="empty" expression="${value}"/> | <param name="empty" expression="${value}"/> | ||||
</xslt> | </xslt> | ||||
</target> | </target> | ||||
<target name="testTransferParameterUnset"> | <target name="testTransferParameterUnset"> | ||||
<xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||||
<xslt in="data.xml" out="${output}/out.xml" style="printParams.xsl"> | |||||
<param name="undefined" expression="${value}"/> | <param name="undefined" expression="${value}"/> | ||||
</xslt> | </xslt> | ||||
</target> | </target> | ||||
<target name="testTransferParameterUnsetWithIf"> | <target name="testTransferParameterUnsetWithIf"> | ||||
<xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||||
<xslt in="data.xml" out="${output}/out.xml" style="printParams.xsl"> | |||||
<param name="undefined" expression="${value}" if="value" /> | <param name="undefined" expression="${value}" if="value" /> | ||||
</xslt> | </xslt> | ||||
</target> | </target> | ||||
<target name="testDefaultMapper"> | <target name="testDefaultMapper"> | ||||
<property name="value" value="myvalue"/> | <property name="value" value="myvalue"/> | ||||
<xslt style="printParams.xsl" destDir="${out.dir}" basedir="."> | |||||
<xslt style="printParams.xsl" destDir="${output}" basedir="."> | |||||
<param name="set" expression="${value}"/> | <param name="set" expression="${value}"/> | ||||
</xslt> | </xslt> | ||||
</target> | </target> | ||||
<target name="testCustomMapper"> | <target name="testCustomMapper"> | ||||
<property name="value" value="myvalue"/> | <property name="value" value="myvalue"/> | ||||
<xslt style="printParams.xsl" destDir="${out.dir}" basedir="."> | |||||
<xslt style="printParams.xsl" destDir="${output}" basedir="."> | |||||
<param name="set" expression="${value}"/> | <param name="set" expression="${value}"/> | ||||
<mapper type="glob" from="data.*" to="out.*"/> | <mapper type="glob" from="data.*" to="out.*"/> | ||||
</xslt> | </xslt> | ||||
@@ -76,7 +72,7 @@ | |||||
<target name="testTypedMapper"> | <target name="testTypedMapper"> | ||||
<property name="value" value="myvalue"/> | <property name="value" value="myvalue"/> | ||||
<xslt style="printParams.xsl" destDir="${out.dir}" basedir="."> | |||||
<xslt style="printParams.xsl" destDir="${output}" basedir="."> | |||||
<param name="set" expression="${value}"/> | <param name="set" expression="${value}"/> | ||||
<globmapper from="data.*" to="out.*"/> | <globmapper from="data.*" to="out.*"/> | ||||
</xslt> | </xslt> | ||||
@@ -84,7 +80,7 @@ | |||||
<target name="testExplicitFileset"> | <target name="testExplicitFileset"> | ||||
<property name="value" value="myvalue"/> | <property name="value" value="myvalue"/> | ||||
<xslt style="printParams.xsl" destDir="${out.dir}" | |||||
<xslt style="printParams.xsl" destDir="${output}" | |||||
useImplicitFileset="false" basedir=".."> | useImplicitFileset="false" basedir=".."> | ||||
<param name="set" expression="${value}"/> | <param name="set" expression="${value}"/> | ||||
<fileset dir="."/> | <fileset dir="."/> | ||||
@@ -95,26 +91,26 @@ | |||||
<antcall target="copyXsl"> | <antcall target="copyXsl"> | ||||
<param name="xsl.value" value="old-value"/> | <param name="xsl.value" value="old-value"/> | ||||
</antcall> | </antcall> | ||||
<xslt in="data.xml" out="${out.dir}/out.xml" style="tmp.xsl"/> | |||||
<xslt in="data.xml" out="${output}/out.xml" style="tmp.xsl"/> | |||||
<antcall target="copyXsl"> | <antcall target="copyXsl"> | ||||
<param name="xsl.value" value="new-value"/> | <param name="xsl.value" value="new-value"/> | ||||
</antcall> | </antcall> | ||||
<xslt in="data.xml" out="${out.dir}/out.xml" style="tmp.xsl"/> | |||||
<xslt in="data.xml" out="${output}/out.xml" style="tmp.xsl"/> | |||||
<delete file="tmp.xsl"/> | <delete file="tmp.xsl"/> | ||||
</target> | </target> | ||||
<target name="testDirectoryHierarchyWithDirMatching"> | <target name="testDirectoryHierarchyWithDirMatching"> | ||||
<mkdir dir="${out.dir}/src/level1/"/> | |||||
<copy file="data.xml" todir="${out.dir}/src/level1/"/> | |||||
<xslt basedir="${out.dir}/src" destdir="${out.dir}/dest" | |||||
<mkdir dir="${output}/src/level1/"/> | |||||
<copy file="data.xml" todir="${output}/src/level1/"/> | |||||
<xslt basedir="${output}/src" destdir="${output}/dest" | |||||
style="printParams.xsl"/> | style="printParams.xsl"/> | ||||
</target> | </target> | ||||
<target name="testDirsWithSpaces"> | <target name="testDirsWithSpaces"> | ||||
<mkdir dir="${out.dir}/s rc/"/> | |||||
<copy file="data.xml" todir="${out.dir}/s rc/"/> | |||||
<xslt basedir="${out.dir}/s rc" destdir="${out.dir}/d est" | |||||
<mkdir dir="${output}/s rc/"/> | |||||
<copy file="data.xml" todir="${output}/s rc/"/> | |||||
<xslt basedir="${output}/s rc" destdir="${output}/d est" | |||||
style="printParams.xsl"/> | style="printParams.xsl"/> | ||||
</target> | </target> | ||||
@@ -127,13 +123,13 @@ | |||||
<target name="testWithStyleAttrAndResource"> | <target name="testWithStyleAttrAndResource"> | ||||
<!-- also testing style as resources, with refid --> | <!-- also testing style as resources, with refid --> | ||||
<file id="xslFile" file="printParams.xsl"/> | <file id="xslFile" file="printParams.xsl"/> | ||||
<xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> | |||||
<xslt in="data.xml" out="${output}/out.xml" style="printParams.xsl"> | |||||
<style refid="xslFile" /> | <style refid="xslFile" /> | ||||
</xslt> | </xslt> | ||||
</target> | </target> | ||||
<target name="testWithFileResource"> | <target name="testWithFileResource"> | ||||
<xslt in="data.xml" out="${out.dir}/out.xml"> | |||||
<xslt in="data.xml" out="${output}/out.xml"> | |||||
<style> | <style> | ||||
<file file="printParams.xsl"/> | <file file="printParams.xsl"/> | ||||
</style> | </style> | ||||
@@ -143,7 +139,7 @@ | |||||
<target name="testWithUrlResource"> | <target name="testWithUrlResource"> | ||||
<makeurl file="printParams.xsl" property="printParams.xsl.url"/> | <makeurl file="printParams.xsl" property="printParams.xsl.url"/> | ||||
<xslt in="data.xml" out="${out.dir}/out.xml"> | |||||
<xslt in="data.xml" out="${output}/out.xml"> | |||||
<style> | <style> | ||||
<url url="${printParams.xsl.url}"/> | <url url="${printParams.xsl.url}"/> | ||||
</style> | </style> | ||||
@@ -152,15 +148,14 @@ | |||||
</target> | </target> | ||||
<target name="testFilenameAndFiledirAsParam"> | <target name="testFilenameAndFiledirAsParam"> | ||||
<mkdir dir="${out.dir}/xml/dir"/> | |||||
<mkdir dir="${out.dir}/out"/> | |||||
<copy file="data.xml" tofile="${out.dir}/xml/one.xml"/> | |||||
<copy file="data.xml" tofile="${out.dir}/xml/two.xml"/> | |||||
<copy file="data.xml" tofile="${out.dir}/xml/three.xml"/> | |||||
<copy file="data.xml" tofile="${out.dir}/xml/dir/four.xml"/> | |||||
<mkdir dir="${output}/xml/dir"/> | |||||
<copy file="data.xml" tofile="${output}/xml/one.xml"/> | |||||
<copy file="data.xml" tofile="${output}/xml/two.xml"/> | |||||
<copy file="data.xml" tofile="${output}/xml/three.xml"/> | |||||
<copy file="data.xml" tofile="${output}/xml/dir/four.xml"/> | |||||
<xslt style="printFilename.xsl" | <xslt style="printFilename.xsl" | ||||
destdir="${out.dir}/out" | |||||
basedir="${out.dir}/xml" | |||||
destdir="${output}" | |||||
basedir="${output}/xml" | |||||
includes="**/*.xml" | includes="**/*.xml" | ||||
extension=".txt" | extension=".txt" | ||||
@@ -170,15 +165,14 @@ | |||||
</target> | </target> | ||||
<target name="testFilenameAsParam"> | <target name="testFilenameAsParam"> | ||||
<mkdir dir="${out.dir}/xml/dir"/> | |||||
<mkdir dir="${out.dir}/out"/> | |||||
<copy file="data.xml" tofile="${out.dir}/xml/one.xml"/> | |||||
<copy file="data.xml" tofile="${out.dir}/xml/two.xml"/> | |||||
<copy file="data.xml" tofile="${out.dir}/xml/three.xml"/> | |||||
<copy file="data.xml" tofile="${out.dir}/xml/dir/four.xml"/> | |||||
<mkdir dir="${output}/xml/dir"/> | |||||
<copy file="data.xml" tofile="${output}/xml/one.xml"/> | |||||
<copy file="data.xml" tofile="${output}/xml/two.xml"/> | |||||
<copy file="data.xml" tofile="${output}/xml/three.xml"/> | |||||
<copy file="data.xml" tofile="${output}/xml/dir/four.xml"/> | |||||
<xslt style="printFilename.xsl" | <xslt style="printFilename.xsl" | ||||
destdir="${out.dir}/out" | |||||
basedir="${out.dir}/xml" | |||||
destdir="${output}" | |||||
basedir="${output}/xml" | |||||
includes="**/*.xml" | includes="**/*.xml" | ||||
extension=".txt" | extension=".txt" | ||||
@@ -187,15 +181,14 @@ | |||||
</target> | </target> | ||||
<target name="testFilenameAsParamNoSetting"> | <target name="testFilenameAsParamNoSetting"> | ||||
<mkdir dir="${out.dir}/xml/dir"/> | |||||
<mkdir dir="${out.dir}/out"/> | |||||
<copy file="data.xml" tofile="${out.dir}/xml/one.xml"/> | |||||
<copy file="data.xml" tofile="${out.dir}/xml/two.xml"/> | |||||
<copy file="data.xml" tofile="${out.dir}/xml/three.xml"/> | |||||
<copy file="data.xml" tofile="${out.dir}/xml/dir/four.xml"/> | |||||
<mkdir dir="${output}/xml/dir"/> | |||||
<copy file="data.xml" tofile="${output}/xml/one.xml"/> | |||||
<copy file="data.xml" tofile="${output}/xml/two.xml"/> | |||||
<copy file="data.xml" tofile="${output}/xml/three.xml"/> | |||||
<copy file="data.xml" tofile="${output}/xml/dir/four.xml"/> | |||||
<xslt style="printFilename.xsl" | <xslt style="printFilename.xsl" | ||||
destdir="${out.dir}/out" | |||||
basedir="${out.dir}/xml" | |||||
destdir="${output}" | |||||
basedir="${output}/xml" | |||||
includes="**/*.xml" | includes="**/*.xml" | ||||
extension=".txt" | extension=".txt" | ||||
/> <!-- without 'filenameparameter' to check, that the xsl:param is NOT set --> | /> <!-- without 'filenameparameter' to check, that the xsl:param is NOT set --> | ||||
@@ -44,13 +44,6 @@ public class RmicAdvancedTest extends BuildFileTest { | |||||
configureProject(TASKDEFS_DIR + "rmic.xml"); | configureProject(TASKDEFS_DIR + "rmic.xml"); | ||||
} | } | ||||
/** | |||||
* The teardown method for JUnit | |||||
*/ | |||||
public void tearDown() { | |||||
executeTarget("teardown"); | |||||
} | |||||
/** | /** | ||||
* verify that "default" binds us to the default compiler | * verify that "default" binds us to the default compiler | ||||
*/ | */ | ||||
@@ -18,6 +18,7 @@ | |||||
package org.apache.tools.ant.taskdefs; | package org.apache.tools.ant.taskdefs; | ||||
import java.io.File; | |||||
import java.io.FileReader; | import java.io.FileReader; | ||||
import java.io.IOException; | import java.io.IOException; | ||||
import java.io.Reader; | import java.io.Reader; | ||||
@@ -45,10 +46,6 @@ public class StyleTest extends BuildFileTest { | |||||
//commented out for performance while target is empty | //commented out for performance while target is empty | ||||
} | } | ||||
protected void tearDown() throws Exception { | |||||
executeTarget("teardown"); | |||||
} | |||||
public void testStyleIsSet() throws Exception { | public void testStyleIsSet() throws Exception { | ||||
expectSpecificBuildException("testStyleIsSet", | expectSpecificBuildException("testStyleIsSet", | ||||
"no stylesheet specified", "specify the " + | "no stylesheet specified", "specify the " + | ||||
@@ -58,31 +55,31 @@ public class StyleTest extends BuildFileTest { | |||||
public void testTransferParameterSet() throws Exception { | public void testTransferParameterSet() throws Exception { | ||||
expectFileContains("testTransferParameterSet", // target | expectFileContains("testTransferParameterSet", // target | ||||
"out/out.xml", // file | |||||
getOutputDir().getAbsoluteFile() + "/out.xml", // file | |||||
"set='myvalue'"); // exptected string | "set='myvalue'"); // exptected string | ||||
} | } | ||||
public void testTransferParameterEmpty() throws Exception { | public void testTransferParameterEmpty() throws Exception { | ||||
expectFileContains("testTransferParameterEmpty", | expectFileContains("testTransferParameterEmpty", | ||||
"out/out.xml", | |||||
getOutputDir().getAbsoluteFile() + "/out.xml", | |||||
"empty=''"); | "empty=''"); | ||||
} | } | ||||
public void testTransferParameterUnset() throws Exception { | public void testTransferParameterUnset() throws Exception { | ||||
expectFileContains("testTransferParameterUnset", | expectFileContains("testTransferParameterUnset", | ||||
"out/out.xml", | |||||
getOutputDir().getAbsoluteFile() + "/out.xml", | |||||
"undefined='${value}'"); | "undefined='${value}'"); | ||||
} | } | ||||
public void testTransferParameterUnsetWithIf() throws Exception { | public void testTransferParameterUnsetWithIf() throws Exception { | ||||
expectFileContains("testTransferParameterUnsetWithIf", | expectFileContains("testTransferParameterUnsetWithIf", | ||||
"out/out.xml", | |||||
getOutputDir().getAbsoluteFile() + "/out.xml", | |||||
"undefined='undefined default value'"); | "undefined='undefined default value'"); | ||||
} | } | ||||
public void testNewerStylesheet() throws Exception { | public void testNewerStylesheet() throws Exception { | ||||
expectFileContains("testNewerStylesheet", | expectFileContains("testNewerStylesheet", | ||||
"out/out.xml", | |||||
getOutputDir().getAbsoluteFile() + "/out.xml", | |||||
"new-value"); | "new-value"); | ||||
} | } | ||||
@@ -95,40 +92,36 @@ public class StyleTest extends BuildFileTest { | |||||
} | } | ||||
public void testDefaultMapper(String target) throws Exception { | public void testDefaultMapper(String target) throws Exception { | ||||
assertTrue(!(FileUtils.getFileUtils().resolveFile( | |||||
getProject().getBaseDir(),"out/data.html")).exists()); | |||||
assertTrue(!( | |||||
new File(getOutputDir().getAbsoluteFile(), "data.html").exists())); | |||||
expectFileContains(target, | expectFileContains(target, | ||||
"out/data.html", | |||||
getOutputDir().getAbsoluteFile() + "/data.html", | |||||
"set='myvalue'"); | "set='myvalue'"); | ||||
} | } | ||||
public void testCustomMapper() throws Exception { | public void testCustomMapper() throws Exception { | ||||
assertTrue(!FILE_UTILS.resolveFile( | |||||
getProject().getBaseDir(), "out/out.xml").exists()); | |||||
assertTrue(!new File(getOutputDir().getAbsoluteFile(), "out.xml").exists()); | |||||
expectFileContains("testCustomMapper", | expectFileContains("testCustomMapper", | ||||
"out/out.xml", | |||||
getOutputDir().getAbsoluteFile() + "/out.xml", | |||||
"set='myvalue'"); | "set='myvalue'"); | ||||
} | } | ||||
public void testTypedMapper() throws Exception { | public void testTypedMapper() throws Exception { | ||||
assertTrue(!FILE_UTILS.resolveFile( | |||||
getProject().getBaseDir(), "out/out.xml").exists()); | |||||
assertTrue(!new File(getOutputDir().getAbsoluteFile(), "out.xml").exists()); | |||||
expectFileContains("testTypedMapper", | expectFileContains("testTypedMapper", | ||||
"out/out.xml", | |||||
getOutputDir().getAbsoluteFile() + "/out.xml", | |||||
"set='myvalue'"); | "set='myvalue'"); | ||||
} | } | ||||
public void testDirectoryHierarchyWithDirMatching() throws Exception { | public void testDirectoryHierarchyWithDirMatching() throws Exception { | ||||
executeTarget("testDirectoryHierarchyWithDirMatching"); | executeTarget("testDirectoryHierarchyWithDirMatching"); | ||||
assertTrue(FILE_UTILS.resolveFile( | |||||
getProject().getBaseDir(), "out/dest/level1/data.html") | |||||
assertTrue(new File(getOutputDir().getAbsoluteFile(), "dest/level1/data.html") | |||||
.exists()); | .exists()); | ||||
} | } | ||||
public void testDirsWithSpaces() throws Exception { | public void testDirsWithSpaces() throws Exception { | ||||
executeTarget("testDirsWithSpaces"); | executeTarget("testDirsWithSpaces"); | ||||
assertTrue(FILE_UTILS.resolveFile( | |||||
getProject().getBaseDir(), "out/d est/data.html") | |||||
assertTrue(new File(getOutputDir().getAbsoluteFile(), "d est/data.html") | |||||
.exists()); | .exists()); | ||||
} | } | ||||
@@ -141,36 +134,36 @@ public class StyleTest extends BuildFileTest { | |||||
} | } | ||||
public void testWithFileResource() throws Exception { | public void testWithFileResource() throws Exception { | ||||
expectFileContains("testWithFileResource", "out/out.xml", "set='value'"); | |||||
expectFileContains("testWithFileResource", getOutputDir().getAbsoluteFile() + "/out.xml", "set='value'"); | |||||
} | } | ||||
public void testWithUrlResource() throws Exception { | public void testWithUrlResource() throws Exception { | ||||
expectFileContains("testWithUrlResource", "out/out.xml", "set='value'"); | |||||
expectFileContains("testWithUrlResource", getOutputDir().getAbsoluteFile() + "/out.xml", "set='value'"); | |||||
} | } | ||||
public void testFilenameAsParam() throws Exception { | public void testFilenameAsParam() throws Exception { | ||||
executeTarget("testFilenameAsParam"); | executeTarget("testFilenameAsParam"); | ||||
assertFileContains("out/out/one.txt", "filename='one.xml'"); | |||||
assertFileContains("out/out/two.txt", "filename='two.xml'"); | |||||
assertFileContains("out/out/three.txt", "filename='three.xml'"); | |||||
assertFileContains("out/out/dir/four.txt", "filename='four.xml'"); | |||||
assertFileContains("out/out/dir/four.txt", "filedir ='-not-set-'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/one.txt", "filename='one.xml'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/two.txt", "filename='two.xml'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/three.txt", "filename='three.xml'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/dir/four.txt", "filename='four.xml'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/dir/four.txt", "filedir ='-not-set-'"); | |||||
} | } | ||||
public void testFilenameAsParamNoSetting() throws Exception { | public void testFilenameAsParamNoSetting() throws Exception { | ||||
executeTarget("testFilenameAsParamNoSetting"); | executeTarget("testFilenameAsParamNoSetting"); | ||||
assertFileContains("out/out/one.txt", "filename='-not-set-'"); | |||||
assertFileContains("out/out/two.txt", "filename='-not-set-'"); | |||||
assertFileContains("out/out/three.txt", "filename='-not-set-'"); | |||||
assertFileContains("out/out/dir/four.txt", "filename='-not-set-'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/one.txt", "filename='-not-set-'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/two.txt", "filename='-not-set-'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/three.txt", "filename='-not-set-'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/dir/four.txt", "filename='-not-set-'"); | |||||
} | } | ||||
public void testFilenameAndFiledirAsParam() throws Exception { | public void testFilenameAndFiledirAsParam() throws Exception { | ||||
executeTarget("testFilenameAndFiledirAsParam"); | executeTarget("testFilenameAndFiledirAsParam"); | ||||
assertFileContains("out/out/one.txt", "filename='one.xml'"); | |||||
assertFileContains("out/out/one.txt", "filedir ='.'"); | |||||
assertFileContains("out/out/dir/four.txt", "filename='four.xml'"); | |||||
assertFileContains("out/out/dir/four.txt", "filedir ='dir'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/one.txt", "filename='one.xml'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/one.txt", "filedir ='.'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/dir/four.txt", "filename='four.xml'"); | |||||
assertFileContains(getOutputDir().getAbsoluteFile() + "/dir/four.txt", "filedir ='dir'"); | |||||
} | } | ||||
@@ -42,10 +42,6 @@ public class DependTest extends BuildFileTest { | |||||
configureProject(TEST_BUILD_FILE); | configureProject(TEST_BUILD_FILE); | ||||
} | } | ||||
public void tearDown() { | |||||
executeTarget("clean"); | |||||
} | |||||
/** | /** | ||||
* Test direct dependency removal | * Test direct dependency removal | ||||
*/ | */ | ||||
@@ -43,27 +43,21 @@ public class TranslateTest extends BuildFileTest { | |||||
configureProject(TASKDEFS_DIR + "/translate.xml"); | configureProject(TASKDEFS_DIR + "/translate.xml"); | ||||
} | } | ||||
public void tearDown() { | |||||
executeTarget("cleanup"); | |||||
} | |||||
public void test1() { | public void test1() { | ||||
executeTarget("test1"); | executeTarget("test1"); | ||||
assertTrue("translation of "+ TASKDEFS_DIR + "/input/template.txt",compareFiles(TASKDEFS_DIR+"/expected/de/template.txt",TASKDEFS_DIR+"/output/de/template.txt")); | |||||
assertTrue("translation of "+ TASKDEFS_DIR + "/input/template.txt",compareFiles(new File(getProjectDir(), "expected/de/template.txt"), | |||||
new File(getOutputDir(), "de/template.txt"))); | |||||
} | } | ||||
private boolean compareFiles(String name1, String name2) { | |||||
File file1 = new File(System.getProperty("root"), name1); | |||||
File file2 = new File(System.getProperty("root"), name2); | |||||
private boolean compareFiles(File file1, File file2) { | |||||
try { | try { | ||||
if (!file1.exists() || !file2.exists()) { | if (!file1.exists() || !file2.exists()) { | ||||
System.out.println("One or both files do not exist:" + name1 + ", " + name2); | |||||
System.out.println("One or both files do not exist:" + file1.getAbsoluteFile() + ", " + file2.getAbsoluteFile()); | |||||
return false; | return false; | ||||
} | } | ||||
if (file1.length() != file2.length()) { | if (file1.length() != file2.length()) { | ||||
System.out.println("File size mismatch:" + name1 + "(" + file1.length() + "), " + | |||||
name2 + "(" + file2.length() + ")"); | |||||
System.out.println("File size mismatch:" + file1.getAbsoluteFile() + "(" + file1.length() + "), " + | |||||
file2.getAbsoluteFile() + "(" + file2.length() + ")"); | |||||
return false; | return false; | ||||
} | } | ||||
@@ -79,7 +73,7 @@ public class TranslateTest extends BuildFileTest { | |||||
fis2.read(buffer2); | fis2.read(buffer2); | ||||
for (int i = 0; i < read; ++i, ++index) { | for (int i = 0; i < read; ++i, ++index) { | ||||
if (buffer1[i] != buffer2[i]) { | if (buffer1[i] != buffer2[i]) { | ||||
System.out.println("Bytes mismatch:" + name1 + ", " + name2 + | |||||
System.out.println("Bytes mismatch:" + file1.getAbsoluteFile() + ", " + file2.getAbsoluteFile() + | |||||
" at byte " + index); | " at byte " + index); | ||||
return false; | return false; | ||||
} | } | ||||
@@ -88,7 +82,7 @@ public class TranslateTest extends BuildFileTest { | |||||
return true; | return true; | ||||
} | } | ||||
catch (IOException e) { | catch (IOException e) { | ||||
System.out.println("IOException comparing files: " + name1 + ", " + name2); | |||||
System.out.println("IOException comparing files: " + file1.getAbsoluteFile() + ", " + file2.getAbsoluteFile()); | |||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
@@ -47,17 +47,13 @@ public class ImageTest extends BuildFileTest { | |||||
} | } | ||||
public void tearDown() { | |||||
executeTarget("cleanup"); | |||||
} | |||||
public void testEchoToLog() { | public void testEchoToLog() { | ||||
expectLogContaining("testEchoToLog", "Processing File"); | expectLogContaining("testEchoToLog", "Processing File"); | ||||
} | } | ||||
public void testSimpleScale(){ | public void testSimpleScale(){ | ||||
expectLogContaining("testSimpleScale", "Processing File"); | expectLogContaining("testSimpleScale", "Processing File"); | ||||
File f = createRelativeFile("/dest/" + LARGEIMAGE); | |||||
File f = new File(getOutputDir(), LARGEIMAGE); | |||||
assertTrue( | assertTrue( | ||||
"Did not create "+f.getAbsolutePath(), | "Did not create "+f.getAbsolutePath(), | ||||
f.exists()); | f.exists()); | ||||
@@ -66,7 +62,7 @@ public class ImageTest extends BuildFileTest { | |||||
public void testOverwriteTrue() { | public void testOverwriteTrue() { | ||||
expectLogContaining("testSimpleScale", "Processing File"); | expectLogContaining("testSimpleScale", "Processing File"); | ||||
File f = createRelativeFile("/dest/" + LARGEIMAGE); | |||||
File f = new File(getOutputDir(), LARGEIMAGE); | |||||
long lastModified = f.lastModified(); | long lastModified = f.lastModified(); | ||||
try { | try { | ||||
Thread.sleep(FILE_UTILS | Thread.sleep(FILE_UTILS | ||||
@@ -74,7 +70,7 @@ public class ImageTest extends BuildFileTest { | |||||
} | } | ||||
catch (InterruptedException e) {} | catch (InterruptedException e) {} | ||||
expectLogContaining("testOverwriteTrue", "Processing File"); | expectLogContaining("testOverwriteTrue", "Processing File"); | ||||
f = createRelativeFile("/dest/" + LARGEIMAGE); | |||||
f = new File(getOutputDir(), LARGEIMAGE); | |||||
long overwrittenLastModified = f.lastModified(); | long overwrittenLastModified = f.lastModified(); | ||||
assertTrue("File was not overwritten.", | assertTrue("File was not overwritten.", | ||||
lastModified < overwrittenLastModified); | lastModified < overwrittenLastModified); | ||||
@@ -82,10 +78,10 @@ public class ImageTest extends BuildFileTest { | |||||
public void testOverwriteFalse() { | public void testOverwriteFalse() { | ||||
expectLogContaining("testSimpleScale", "Processing File"); | expectLogContaining("testSimpleScale", "Processing File"); | ||||
File f = createRelativeFile("/dest/" + LARGEIMAGE); | |||||
File f = new File(getOutputDir(), LARGEIMAGE); | |||||
long lastModified = f.lastModified(); | long lastModified = f.lastModified(); | ||||
expectLogContaining("testOverwriteFalse", "Processing File"); | expectLogContaining("testOverwriteFalse", "Processing File"); | ||||
f = createRelativeFile("/dest/" + LARGEIMAGE); | |||||
f = new File(getOutputDir(), LARGEIMAGE); | |||||
long overwrittenLastModified = f.lastModified(); | long overwrittenLastModified = f.lastModified(); | ||||
assertTrue("File was overwritten.", | assertTrue("File was overwritten.", | ||||
lastModified == overwrittenLastModified); | lastModified == overwrittenLastModified); | ||||
@@ -93,7 +89,7 @@ public class ImageTest extends BuildFileTest { | |||||
public void testSimpleScaleWithMapper() { | public void testSimpleScaleWithMapper() { | ||||
expectLogContaining("testSimpleScaleWithMapper", "Processing File"); | expectLogContaining("testSimpleScaleWithMapper", "Processing File"); | ||||
File f = createRelativeFile("/dest/scaled-" + LARGEIMAGE); | |||||
File f = new File(getOutputDir(), "scaled-" + LARGEIMAGE); | |||||
assertTrue( | assertTrue( | ||||
"Did not create "+f.getAbsolutePath(), | "Did not create "+f.getAbsolutePath(), | ||||
f.exists()); | f.exists()); | ||||
@@ -113,15 +109,5 @@ public class ImageTest extends BuildFileTest { | |||||
.indexOf("Unable to process image stream") > -1); | .indexOf("Unable to process image stream") > -1); | ||||
} | } | ||||
} | } | ||||
protected File createRelativeFile(String filename) { | |||||
if (filename.equals(".")) { | |||||
return getProjectDir(); | |||||
} | |||||
// else | |||||
return new File(getProjectDir(), filename); | |||||
} | |||||
} | } | ||||
@@ -35,6 +35,8 @@ import org.apache.tools.ant.BuildFileTest; | |||||
import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
import org.apache.tools.ant.util.SymbolicLinkUtils; | import org.apache.tools.ant.util.SymbolicLinkUtils; | ||||
import java.io.File; | |||||
/** | /** | ||||
* Test cases for the Symlink task. Link creation, link deletion, recording | * Test cases for the Symlink task. Link creation, link deletion, recording | ||||
* of links in multiple directories, and restoration of links recorded are | * of links in multiple directories, and restoration of links recorded are | ||||
@@ -56,7 +58,7 @@ public class SymlinkTest extends BuildFileTest { | |||||
public void setUp() { | public void setUp() { | ||||
if (supportsSymlinks) { | if (supportsSymlinks) { | ||||
configureProject("src/etc/testcases/taskdefs/optional/unix/symlink.xml"); | configureProject("src/etc/testcases/taskdefs/optional/unix/symlink.xml"); | ||||
executeTarget("setup"); | |||||
executeTarget("setUp"); | |||||
} | } | ||||
} | } | ||||
@@ -187,7 +189,7 @@ public class SymlinkTest extends BuildFileTest { | |||||
executeTarget("test-fileutils"); | executeTarget("test-fileutils"); | ||||
SymbolicLinkUtils su = SymbolicLinkUtils.getSymbolicLinkUtils(); | SymbolicLinkUtils su = SymbolicLinkUtils.getSymbolicLinkUtils(); | ||||
java.io.File f = getProject().resolveFile("test-working/file1"); | |||||
java.io.File f = new File(getOutputDir(), "file1"); | |||||
assertTrue(f.exists()); | assertTrue(f.exists()); | ||||
assertFalse(f.isDirectory()); | assertFalse(f.isDirectory()); | ||||
assertTrue(f.isFile()); | assertTrue(f.isFile()); | ||||
@@ -198,7 +200,7 @@ public class SymlinkTest extends BuildFileTest { | |||||
assertFalse(su.isDanglingSymbolicLink(f.getParentFile(), | assertFalse(su.isDanglingSymbolicLink(f.getParentFile(), | ||||
f.getName())); | f.getName())); | ||||
f = getProject().resolveFile("test-working/dir1"); | |||||
f = new File(getOutputDir(), "dir1"); | |||||
assertTrue(f.exists()); | assertTrue(f.exists()); | ||||
assertTrue(f.isDirectory()); | assertTrue(f.isDirectory()); | ||||
assertFalse(f.isFile()); | assertFalse(f.isFile()); | ||||
@@ -209,7 +211,7 @@ public class SymlinkTest extends BuildFileTest { | |||||
assertFalse(su.isDanglingSymbolicLink(f.getParentFile(), | assertFalse(su.isDanglingSymbolicLink(f.getParentFile(), | ||||
f.getName())); | f.getName())); | ||||
f = getProject().resolveFile("test-working/file2"); | |||||
f = new File(getOutputDir(), "file2"); | |||||
assertFalse(f.exists()); | assertFalse(f.exists()); | ||||
assertFalse(f.isDirectory()); | assertFalse(f.isDirectory()); | ||||
assertFalse(f.isFile()); | assertFalse(f.isFile()); | ||||
@@ -220,7 +222,7 @@ public class SymlinkTest extends BuildFileTest { | |||||
assertFalse(su.isDanglingSymbolicLink(f.getParentFile(), | assertFalse(su.isDanglingSymbolicLink(f.getParentFile(), | ||||
f.getName())); | f.getName())); | ||||
f = getProject().resolveFile("test-working/dir2"); | |||||
f = new File(getOutputDir(), "dir2"); | |||||
assertFalse(f.exists()); | assertFalse(f.exists()); | ||||
assertFalse(f.isDirectory()); | assertFalse(f.isDirectory()); | ||||
assertFalse(f.isFile()); | assertFalse(f.isFile()); | ||||
@@ -232,7 +234,7 @@ public class SymlinkTest extends BuildFileTest { | |||||
f.getName())); | f.getName())); | ||||
f = getProject().resolveFile("test-working/file.there"); | |||||
f = new File(getOutputDir(), "file.there"); | |||||
assertTrue(f.exists()); | assertTrue(f.exists()); | ||||
assertFalse(f.isDirectory()); | assertFalse(f.isDirectory()); | ||||
assertTrue(f.isFile()); | assertTrue(f.isFile()); | ||||
@@ -243,7 +245,7 @@ public class SymlinkTest extends BuildFileTest { | |||||
assertFalse(su.isDanglingSymbolicLink(f.getParentFile(), | assertFalse(su.isDanglingSymbolicLink(f.getParentFile(), | ||||
f.getName())); | f.getName())); | ||||
f = getProject().resolveFile("test-working/dir.there"); | |||||
f = new File(getOutputDir(), "dir.there"); | |||||
assertTrue(f.exists()); | assertTrue(f.exists()); | ||||
assertTrue(f.isDirectory()); | assertTrue(f.isDirectory()); | ||||
assertFalse(f.isFile()); | assertFalse(f.isFile()); | ||||
@@ -260,7 +262,7 @@ public class SymlinkTest extends BuildFileTest { | |||||
// this is not true under Snow Leopard and JDK 1.5 | // this is not true under Snow Leopard and JDK 1.5 | ||||
// Removing special handling of MacOS until someone shouts | // Removing special handling of MacOS until someone shouts | ||||
// Antoine | // Antoine | ||||
f = getProject().resolveFile("test-working/file.notthere"); | |||||
f = new File(getOutputDir(), "file.notthere"); | |||||
assertFalse(f.exists()); | assertFalse(f.exists()); | ||||
assertFalse(f.isDirectory()); | assertFalse(f.isDirectory()); | ||||
assertFalse(f.isFile()); | assertFalse(f.isFile()); | ||||
@@ -270,7 +272,7 @@ public class SymlinkTest extends BuildFileTest { | |||||
assertTrue(su.isDanglingSymbolicLink(f.getParentFile(), | assertTrue(su.isDanglingSymbolicLink(f.getParentFile(), | ||||
f.getName())); | f.getName())); | ||||
f = getProject().resolveFile("test-working/dir.notthere"); | |||||
f = new File(getOutputDir(), "dir.notthere"); | |||||
assertFalse(f.exists()); | assertFalse(f.exists()); | ||||
assertFalse(f.isDirectory()); | assertFalse(f.isDirectory()); | ||||
assertFalse(f.isFile()); | assertFalse(f.isFile()); | ||||
@@ -285,7 +287,7 @@ public class SymlinkTest extends BuildFileTest { | |||||
public void tearDown() { | public void tearDown() { | ||||
if (supportsSymlinks) { | if (supportsSymlinks) { | ||||
executeTarget("teardown"); | |||||
executeTarget("tearDown"); | |||||
} | } | ||||
} | } | ||||
@@ -42,10 +42,6 @@ public class ClassFileSetTest extends BuildFileTest { | |||||
configureProject("src/etc/testcases/taskdefs/optional/depend/depend.xml"); | configureProject("src/etc/testcases/taskdefs/optional/depend/depend.xml"); | ||||
} | } | ||||
public void tearDown() { | |||||
executeTarget("clean"); | |||||
} | |||||
/** | /** | ||||
* Test basic classfileset | * Test basic classfileset | ||||
*/ | */ | ||||