ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r708936 - in /ant/core/trunk/src: etc/testcases/taskdefs/concat.xml tests/antunit/taskdefs/concat-test.xml tests/junit/org/apache/tools/ant/taskdefs/ConcatTest.java
Date Wed, 29 Oct 2008 16:44:05 GMT
Author: mbenson
Date: Wed Oct 29 09:44:05 2008
New Revision: 708936

URL: http://svn.apache.org/viewvc?rev=708936&view=rev
Log:
move an antunity test

Modified:
    ant/core/trunk/src/etc/testcases/taskdefs/concat.xml
    ant/core/trunk/src/tests/antunit/taskdefs/concat-test.xml
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/ConcatTest.java

Modified: ant/core/trunk/src/etc/testcases/taskdefs/concat.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/taskdefs/concat.xml?rev=708936&r1=708935&r2=708936&view=diff
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/concat.xml (original)
+++ ant/core/trunk/src/etc/testcases/taskdefs/concat.xml Wed Oct 29 09:44:05 2008
@@ -202,30 +202,4 @@
     </concat>
   </target>
 
-  <target name="testResources" unless="offline">
-    <concat destfile="concat.urls" binary="true">
-      <url url="http://ant.apache.org" />
-      <url url="http://ant.apache.org" />
-    </concat>
-    <length property="expected">
-      <resources>
-        <url url="http://ant.apache.org" />
-        <url url="http://ant.apache.org" />
-      </resources>
-    </length>
-    <length property="actual">
-      <fileset file="concat.urls" />
-    </length>
-    <fail>
-      <condition>
-        <or>
-          <equals arg1="${actual}" arg2="0" />
-          <not>
-            <equals arg1="${actual}" arg2="${expected}" />
-          </not>
-        </or>
-      </condition>
-    </fail>
-  </target>
-
 </project>

Modified: ant/core/trunk/src/tests/antunit/taskdefs/concat-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/concat-test.xml?rev=708936&r1=708935&r2=708936&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/concat-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/concat-test.xml Wed Oct 29 09:44:05 2008
@@ -18,6 +18,10 @@
 <project default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
   <import file="../antunit-base.xml" />
 
+  <target name="tearDown">
+    <delete file="concat.resources" />
+  </target>
+
   <property name="encodeStringDest" location="${output}/encodeStringDest"/>
 
   <target name="testBinaryAppend">
@@ -115,4 +119,34 @@
     <au:assertFileExists file="${output}/TESTDEST"/>
     <au:assertResourceContains resource="${output}/TESTDEST" value="footer"/>
   </target>
+
+  <target name="testResources">
+    <string id="s1">The Quick Brown Fox</string>
+    <string id="s2">Jumped Over The Lazy Dog.</string>
+
+    <concat destfile="concat.resources" binary="true">
+      <resource refid="s1" />
+      <resource refid="s2" />
+    </concat>
+    <length property="expected">
+      <resources>
+        <resource refid="s1" />
+        <resource refid="s2" />
+      </resources>
+    </length>
+    <length property="actual">
+      <file file="concat.resources" />
+    </length>
+    <fail>
+      <condition>
+        <or>
+          <equals arg1="${actual}" arg2="0" />
+          <not>
+            <equals arg1="${actual}" arg2="${expected}" />
+          </not>
+        </or>
+      </condition>
+    </fail>
+  </target>
+
 </project>

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/ConcatTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/ConcatTest.java?rev=708936&r1=708935&r2=708936&view=diff
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/ConcatTest.java (original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/ConcatTest.java Wed Oct 29
09:44:05 2008
@@ -278,8 +278,4 @@
                 FILE_UTILS.contentEquals(f1, f2));
     }
 
-    public void testResources() {
-        executeTarget("testResources");
-    }
-
 }



Mime
View raw message