ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r442445 - in /ant/core/trunk/src: etc/testcases/core/location.xml testcases/org/apache/tools/ant/LocationTest.java
Date Tue, 12 Sep 2006 04:27:43 GMT
Author: bodewig
Date: Mon Sep 11 21:27:39 2006
New Revision: 442445

URL: http://svn.apache.org/viewvc?view=rev&rev=442445
Log:
Add a test for presetdef-ed tasks for completeness

Modified:
    ant/core/trunk/src/etc/testcases/core/location.xml
    ant/core/trunk/src/testcases/org/apache/tools/ant/LocationTest.java

Modified: ant/core/trunk/src/etc/testcases/core/location.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/core/location.xml?view=diff&rev=442445&r1=442444&r2=442445
==============================================================================
--- ant/core/trunk/src/etc/testcases/core/location.xml (original)
+++ ant/core/trunk/src/etc/testcases/core/location.xml Mon Sep 11 21:27:39 2006
@@ -60,4 +60,15 @@
     <echoloc2/>
   </target>
 
+  <target name="presetdef" depends="define">
+    <presetdef name="echoloc3">
+      <echoloc/>
+    </presetdef>
+  </target>
+
+  <target name="testPresetdefWrappedTask" depends="presetdef">
+    <echo id="echo4">Hello</echo>
+    <echoloc3/>
+  </target>
+
 </project>

Modified: ant/core/trunk/src/testcases/org/apache/tools/ant/LocationTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/testcases/org/apache/tools/ant/LocationTest.java?view=diff&rev=442445&r1=442444&r2=442445
==============================================================================
--- ant/core/trunk/src/testcases/org/apache/tools/ant/LocationTest.java (original)
+++ ant/core/trunk/src/testcases/org/apache/tools/ant/LocationTest.java Mon Sep 11 21:27:39
2006
@@ -60,6 +60,14 @@
                    > -1);
     }
 
+    public void testPresetdefWrappedTask() {
+        executeTarget("testPresetdefWrappedTask");
+        Echo e = (Echo) getProject().getReference("echo4");
+        assertTrue(getLog().indexOf("Line: " 
+                                    + (e.getLocation().getLineNumber() + 1))
+                   > -1);
+    }
+
     public static class EchoLocation extends Task {
         public void execute() {
             log("Line: " + getLocation().getLineNumber(), Project.MSG_INFO);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message