incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickcha...@apache.org
Subject svn commit: rev 10350 - incubator/depot/trunk/update/src/test/org/apache/depot/update/ant
Date Wed, 28 Apr 2004 05:39:43 GMT
Author: nickchalko
Date: Tue Apr 27 22:39:42 2004
New Revision: 10350

Removed:
   incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/UpdateSetTaskTest.java
Modified:
   incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/CachedResourceSetTaskTest.java
   incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/build.xml
Log:
Fixed the jars cleanup.
Added a Not Found test.

Modified: incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/CachedResourceSetTaskTest.java
==============================================================================
--- incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/CachedResourceSetTaskTest.java
(original)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/CachedResourceSetTaskTest.java
Tue Apr 27 22:39:42 2004
@@ -43,7 +43,8 @@
 	public void test1() {
 		try {
 			executeTarget("test1");
-			File file = new File("build/test/sandbox/helloworld/jars/helloworld-1.2.jar");
+			File file = new File(
+					"build/test/sandbox/helloworld/jars/helloworld-1.2.jar");
 			assertTrue("Expected " + file + " to  exists", file.exists());
 		} finally {
 			System.out.println(getOutput());
@@ -52,9 +53,16 @@
 	public void test2() {
 		try {
 			executeTarget("test2");
-			System.out.println(getOutput());
-			File file = new File("build/test/sandbox/helloworld/jars/helloworld-1.2.jar");
+			File file = new File(
+					"build/test/sandbox/helloworld/jars/helloworld-1.2.jar");
 			assertTrue("Expected " + file + " to  exists", file.exists());
+		} finally {
+			System.out.println(getOutput());
+		}
+	}
+	public void testNotFound() {
+		try {
+			expectSpecificBuildException("testNotFound", "notfound does not exist", "Unable to find
notfound-1.2.jar@localtest");
 		} finally {
 			System.out.println(getOutput());
 		}

Modified: incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/build.xml
==============================================================================
--- incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/build.xml	(original)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/build.xml	Tue Apr 27
22:39:42 2004
@@ -14,40 +14,51 @@
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
--->
-<project name="ruperModule-test" basedir="../../../../../../../" default="test1">
-    <property name="localtest.dir" value="${basedir}/src/resources/test/repo"/>
-    <property name="depot.home" value="${basedir}/build/depot-home"/>
-    <typedef resource="depot-update-antlib.xml"/>
-    <repository id="maven" url="http://www.ibiblio.org/maven/" remote="true"/>
-    <repository id="localtest" url="file:///${localtest.dir}" remote="true"/>
-    <target name="test1" depends="clean-jars">
-        <copy toDir="${depot.home}/local-repository">
-            <fileset dir="${localtest.dir}"/>
-        </copy>
-        <cachedset id="test1">
-            <resource name="helloworld" ext="jar" version="1.2" repository="localtest"/>
-        </cachedset>
-        <copy toDir="build/test/sandbox">
-            <fileset refid="test1.fileset"/>
-        </copy>
-    </target>
-    <target name="test2" depends="clean-jars">
-        <cachedset id="test2">
-            <resource name="helloworld" ext="jar" version="1.2" repository="localtest"/>
-        </cachedset>
-        <copy toDir="build/test/sandbox">
-            <fileset refid="test2.fileset"/>
-        </copy>
-    </target>
-    <target name="test3">
-        <ruperFileSet id="foo">
-            <project name="xalan" version="4" module="http://gump.apache.org/modules/xalan.xml"/>
-        </ruperFileSet>
-    </target>
-    <target name="test4"/>
-    <target name="clean-jars">
-        <delete dir="${ant.home}/tools/repo/helloworld"/>
-        <delete dir="build/test/sandbox"/>
-    </target>
-</project>
+-->
+<project name="updateModule-test" basedir="../../../../../../../" default="test1">
+	<property name="localtest.dir" value="${basedir}/src/resources/test/repo" />
+
+	<property name="depot.home" value="${basedir}/build/depot-home" />
+	<property name="local.repository" value="${depot.home}/local-repository" />
+	<typedef resource="depot-update-antlib.xml" />
+	<repository id="maven" url="http://www.ibiblio.org/maven/" remote="true" />
+	<repository id="localtest" url="file:///${localtest.dir}" remote="true" />
+	<target name="test1" depends="clean-jars">
+		<copy toDir="${depot.home}/local-repository">
+			<fileset dir="${localtest.dir}" />
+		</copy>
+		<cachedset id="test1">
+			<resource name="helloworld" ext="jar" version="1.2" repository="localtest" />
+		</cachedset>
+		<copy toDir="build/test/sandbox">
+			<fileset refid="test1.fileset" />
+		</copy>
+	</target>
+	<target name="test2" depends="clean-jars">
+		<cachedset id="test2">
+			<resource name="helloworld" ext="jar" version="1.2" repository="localtest" />
+		</cachedset>
+		<copy toDir="build/test/sandbox">
+			<fileset refid="test2.fileset" />
+		</copy>
+	</target>
+	<target name="test3">
+		<!--cachedset id="foo">
+			<project name="xalan" version="4" module="http://gump.apache.org/modules/xalan.xml"
/>
+		</cachedset-->
+	</target>
+	<target name="testNotFound">
+		<cachedset id="testNotFound">
+			<resource name="notfound" ext="jar" version="1.2" repository="localtest" />
+		</cachedset>
+		<!-- have to use the chaced set before it is used. -->
+		<copy toDir="build/test/sandbox">
+			<fileset refid="testNotFound.fileset" />
+		</copy>
+	</target>
+
+	<target name="clean-jars">
+		<delete dir="${local.repository}" />
+		<delete dir="build/test/sandbox" />
+	</target>
+</project>

Mime
View raw message