CVS: junit/experimental-use-of-antunit junit.ant, NONE, 1.1 junit-old.ant, NONE, 1.1 build.xml, NONE, 1.1 touch.ant, NONE, 1.1

David Saff <[email protected]>
Newsgroups gmane.comp.java.junit.devel
Message-ID <[email protected]>
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>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.