ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1351063 - in /ant/antlibs/antunit/trunk/src: main/org/apache/ant/antunit/ResourceExists.java tests/antunit/ tests/antunit/antunit-base.xml tests/antunit/assertResourceExists-test.xml tests/antunit/resourceexists-test.xml
Date Sun, 17 Jun 2012 07:05:31 GMT
Author: bodewig
Date: Sun Jun 17 07:05:30 2012
New Revision: 1351063

URL: http://svn.apache.org/viewvc?rev=1351063&view=rev
Log:
Actually, resources as attributes don't work very well

Added:
    ant/antlibs/antunit/trunk/src/tests/antunit/
    ant/antlibs/antunit/trunk/src/tests/antunit/antunit-base.xml
      - copied, changed from r1350856, ant/core/trunk/src/tests/antunit/antunit-base.xml
    ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml
      - copied, changed from r1351060, ant/core/trunk/src/tests/antunit/taskdefs/condition/resourceexists-test.xml
    ant/antlibs/antunit/trunk/src/tests/antunit/resourceexists-test.xml
      - copied, changed from r1351060, ant/core/trunk/src/tests/antunit/taskdefs/condition/resourceexists-test.xml
Modified:
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java

Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java?rev=1351063&r1=1351062&r2=1351063&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java (original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java Sun Jun
17 07:05:30 2012
@@ -44,6 +44,7 @@ public class ResourceExists extends Proj
             throw new BuildException("Only one resource can be tested.");
         }
         resource = r;
+        System.err.println("R: " + r);
     }
 
     /**

Copied: ant/antlibs/antunit/trunk/src/tests/antunit/antunit-base.xml (from r1350856, ant/core/trunk/src/tests/antunit/antunit-base.xml)
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/tests/antunit/antunit-base.xml?p2=ant/antlibs/antunit/trunk/src/tests/antunit/antunit-base.xml&p1=ant/core/trunk/src/tests/antunit/antunit-base.xml&r1=1350856&r2=1351063&rev=1351063&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/antunit-base.xml (original)
+++ ant/antlibs/antunit/trunk/src/tests/antunit/antunit-base.xml Sun Jun 17 07:05:30 2012
@@ -20,17 +20,6 @@
   <property name="antunit.tmpdir" location="${java.io.tmpdir}"/>
   <property name="input" location="${antunit.tmpdir}/testinput"/>
   <property name="output" location="${antunit.tmpdir}/testoutput"/>
-  <property name="resources" location="${antunit.tmpdir}/resources"/>
-  <property name="test.jar" location="${antunit.tmpdir}/test.jar"/>
-  <property name="test1.jar" location="${antunit.tmpdir}/test1.jar"/>
-  <property name="test2.jar" location="${antunit.tmpdir}/test2.jar"/>
-  <property name="test3.jar" location="${antunit.tmpdir}/test3.jar"/>
-  <property name="test4.jar" location="${antunit.tmpdir}/test4.jar"/>
-  <property name="test5.jar" location="${antunit.tmpdir}/test5.jar"/>
-  <available property="jdk1.8+" classname="java.lang.reflect.Executable"/>
-  <available property="jdk1.7+" classname="java.nio.file.FileSystem"/>
-  <available property="jdk1.6+" classname="java.net.CookieStore"/>
-  <available property="jdk1.5+" classname="java.net.Proxy"/>
   <condition property="build.sysclasspath.only">
     <equals arg1="${build.sysclasspath}" arg2="only"/>
   </condition>
@@ -38,13 +27,6 @@
   <target name="tearDown">
     <delete dir="${input}"/>
     <delete dir="${output}"/>
-    <delete dir="${resources}"/>
-    <delete file="${test.jar}" failonerror="false" deleteonexit="true"/>
-    <delete file="${test1.jar}" failonerror="false" deleteonexit="true"/>
-    <delete file="${test2.jar}" failonerror="false" deleteonexit="true"/>
-    <delete file="${test3.jar}" failonerror="false" deleteonexit="true"/>
-    <delete file="${test4.jar}" failonerror="false" deleteonexit="true"/>
-    <delete file="${test5.jar}" failonerror="false" deleteonexit="true"/>
   </target>
 
   <target name="antunit">

Copied: ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml (from r1351060,
ant/core/trunk/src/tests/antunit/taskdefs/condition/resourceexists-test.xml)
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml?p2=ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml&p1=ant/core/trunk/src/tests/antunit/taskdefs/condition/resourceexists-test.xml&r1=1351060&r2=1351063&rev=1351063&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/condition/resourceexists-test.xml (original)
+++ ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml Sun Jun 17 07:05:30
2012
@@ -15,33 +15,19 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<project xmlns:au="antlib:org.apache.ant.antunit" default="antunit"
-         xmlns:cond="antlib:org.apache.tools.ant.types.conditions">
+<project xmlns:au="antlib:org.apache.ant.antunit" default="antunit">
 
-  <import file="../../antunit-base.xml"/>
+  <import file="antunit-base.xml"/>
 
-  <target name="test-yes">
-    <au:assertTrue>
-      <cond:resourceexists>
-        <file file="resourceexists-test.xml"/>
-      </cond:resourceexists>
-    </au:assertTrue>
+  <target name="NOtestURL"
+          description="https://issues.apache.org/bugzilla/show_bug.cgi?id=53383">
+    <au:assertResourceExists resource="http://ant.apache.org/index.html"/>
   </target>
 
-  <target name="test-no">
-    <au:assertFalse>
-      <cond:resourceexists>
-        <file file="resourceexists-test-not-there.xml"/>
-      </cond:resourceexists>
-    </au:assertFalse>
-  </target>
-
-  <target name="testURL">
-    <au:assertTrue>
-      <cond:resourceexists>
-        <url url="http://ant.apache.org/index.html"/>
-      </cond:resourceexists>
-    </au:assertTrue>
+  <target name="NOtestURLUsingRef"
+          description="https://issues.apache.org/bugzilla/show_bug.cgi?id=53383">
+    <url url="http://ant.apache.org/index.html" id="antsite"/>
+    <au:assertResourceExists resource="${ant.refid:antsite}"/>
   </target>
 
 </project>

Copied: ant/antlibs/antunit/trunk/src/tests/antunit/resourceexists-test.xml (from r1351060,
ant/core/trunk/src/tests/antunit/taskdefs/condition/resourceexists-test.xml)
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/tests/antunit/resourceexists-test.xml?p2=ant/antlibs/antunit/trunk/src/tests/antunit/resourceexists-test.xml&p1=ant/core/trunk/src/tests/antunit/taskdefs/condition/resourceexists-test.xml&r1=1351060&r2=1351063&rev=1351063&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/condition/resourceexists-test.xml (original)
+++ ant/antlibs/antunit/trunk/src/tests/antunit/resourceexists-test.xml Sun Jun 17 07:05:30
2012
@@ -15,32 +15,44 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<project xmlns:au="antlib:org.apache.ant.antunit" default="antunit"
-         xmlns:cond="antlib:org.apache.tools.ant.types.conditions">
+<project xmlns:au="antlib:org.apache.ant.antunit" default="antunit">
 
-  <import file="../../antunit-base.xml"/>
+  <import file="antunit-base.xml"/>
 
   <target name="test-yes">
     <au:assertTrue>
-      <cond:resourceexists>
+      <au:resourceExists>
         <file file="resourceexists-test.xml"/>
-      </cond:resourceexists>
+      </au:resourceExists>
     </au:assertTrue>
   </target>
 
   <target name="test-no">
     <au:assertFalse>
-      <cond:resourceexists>
+      <au:resourceExists>
         <file file="resourceexists-test-not-there.xml"/>
-      </cond:resourceexists>
+      </au:resourceExists>
     </au:assertFalse>
   </target>
 
   <target name="testURL">
     <au:assertTrue>
-      <cond:resourceexists>
+      <au:resourceExists>
         <url url="http://ant.apache.org/index.html"/>
-      </cond:resourceexists>
+      </au:resourceExists>
+    </au:assertTrue>
+  </target>
+
+  <target name="NOtestURLAttribute">
+    <au:assertTrue>
+      <au:resourceExists resource="http://ant.apache.org/index.html"/>
+    </au:assertTrue>
+  </target>
+
+  <target name="testURLAttributeUsingRef">
+    <url url="http://ant.apache.org/index.html" id="antsite"/>
+    <au:assertTrue>
+      <au:resourceExists resource="${ant.refid:antsite}"/>
     </au:assertTrue>
   </target>
 



Mime
View raw message