From: David S. <ds...@us...> - 2007-02-21 18:26:16
|
Update of /cvsroot/junit/junit/experimental-use-of-antunit In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10549/experimental-use-of-antunit Added Files: junit.ant junit-old.ant build.xml touch.ant Log Message: With ant-1.7, this directory contains files for testing build.xml, which is useful for forward migration --- NEW FILE: junit.ant --- <project xmlns:au="antlib:org.apache.ant.antunit"> <property name="junitdir" value=".." /> <property name="antdist" value="temp-dist-directory-for-ant-unit"></property> <property name="antdistdir" value="${junitdir}/${antdist}"/> <!-- is called prior to the test --> <target name="setUp"> </target> <!-- is called after the test, even if that caused an error --> <target name="tearDown"> <delete dir="${antdistdir}" /> </target> <target name="testTearDown"> <mkdir dir="${antdistdir}"/> <antcall target="tearDown" /> <au:assertFileDoesntExist file="${antdistdir}" /> </target> <target name="testCharacterize_DistGeneratesJavadoc"> <ant antfile="build.xml" target="dist" dir="${junitdir}"> <property name="dist" value="${antdist}" /> <property name="javadocdir" value="${antdist}/ant-unit-java-docs" /> </ant> <au:assertFileExists file="${antdistdir}/ant-unit-java-docs" /> </target> </project> --- NEW FILE: junit-old.ant --- <project xmlns:au="antlib:org.apache.ant.antunit"> <!-- is called prior to the test --> <target name="setUp"> </target> <!-- is called after the test, even if that caused an error --> <target name="tearDown"> </target> <target name="testCharacterize_DistGeneratesJavadoc"> <!-- TODO: delete dist afterward --> <!-- TODO: DUP --> <ant antfile="../junit-head/build.xml" target="dist" dir="../junit-head"> <property name="dist" value="saff5" /> </ant> <!-- TODO: DUP --> <au:assertFileExists file="../junit-head/saff5/javadoc/org" /> </target> <!-- TODO: takes a long time --> <target name="testJavaDocZipCreatesZip"> <!-- TODO: DUP --> <ant antfile="../junit-head/build.xml" target="javadoczip" dir="../junit-head"> <property name="dist" value="saff5" /> </ant> <!-- TODO: dist name is DUP --> <!-- TODO: javadocs name is DUP --> <!-- TODO: delete this file on teardown --> <au:assertFileExists file="../junit-head/saff5-javadocs.zip" /> <!-- TODO: DUP --> <unzip dest="javadoctemp" src="../junit-head/saff5-javadocs.zip"></unzip> <au:assertFileExists file="javadoctemp/org" /> </target> <!-- TODO: delete dist on tearDown --> </project> --- NEW FILE: build.xml --- <project xmlns:au="antlib:org.apache.ant.antunit"> <taskdef uri="antlib:org.apache.ant.antunit" resource="org/apache/ant/antunit/antlib.xml" classpath="lib/ant-antunit-1.0.jar" /> <au:antunit> <fileset dir="." includes="touch.ant,junit.ant" /> <au:plainlistener /> </au:antunit> </project> --- NEW FILE: touch.ant --- <project xmlns:au="antlib:org.apache.ant.antunit"> <!-- is called prior to the test --> <target name="setUp"> <property name="foo" value="foo"/> </target> <!-- is called after the test, even if that caused an error --> <target name="tearDown"> <delete file="${foo}" quiet="true"/> </target> <!-- the actual test case --> <target name="testTouchCreatesFile"> <au:assertFileDoesntExist file="${foo}"/> <touch file="${foo}"/> <au:assertFileExists file="${foo}"/> </target> </project> |