ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r497387 - in /ant/core/trunk/src/tests/antunit/taskdefs: xmlproperty-test.xml xmlproperty.inline-expansion.xml
Date Thu, 18 Jan 2007 10:33:30 GMT
Author: stevel
Date: Thu Jan 18 02:33:30 2007
New Revision: 497387

URL: http://svn.apache.org/viewvc?view=rev&rev=497387
Log:
looking at how xml properties get expanded

Added:
    ant/core/trunk/src/tests/antunit/taskdefs/xmlproperty.inline-expansion.xml
Modified:
    ant/core/trunk/src/tests/antunit/taskdefs/xmlproperty-test.xml

Modified: ant/core/trunk/src/tests/antunit/taskdefs/xmlproperty-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/xmlproperty-test.xml?view=diff&rev=497387&r1=497386&r2=497387
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/xmlproperty-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/xmlproperty-test.xml Thu Jan 18 02:33:30 2007
@@ -6,12 +6,39 @@
       <equals arg1="" arg2="${project.description}"/>
     </au:assertTrue>
   </target>
+
   <target name="test-multi">
     <property name="root.element.value" value="original"/>
     <xmlproperty file="xmlproperty.multi.xml" collapseAttributes="yes"/>
     <au:assertTrue>
       <equals arg1="original" arg2="${root.element.value}"/>
     </au:assertTrue>
+  </target>
+
+  <target name="testInlineExpansion">
+    <xmlproperty
+        file="xmlproperty.inline-expansion.xml"
+        collapseAttributes="true"
+        keepRoot="false"
+        semanticAttributes="true"/>
+    <echo>
+ element      expected    actual
+    p         ${app.n}    ${app.p}
+    n            n        ${app.n}
+    o            n        ${app.o}
+    m            n        ${app.m}
+    </echo>
+    <au:assertPropertyEquals name="app.p" value="${app.n}"/>
+    <au:assertPropertyEquals name="app.n" value="n"/>
+    <au:assertPropertyEquals name="app.o" value="n"/>
+    <au:assertPropertyEquals name="app.m" value="n"/>
+    <au:assertEquals actual="${app.n}" expected="n"/>
+    <au:assertEquals actual="${app.o}" expected="n"/>
+    <au:assertEquals actual="${app.m}" expected="n"/>
+    <fail>
+      <not> 
+      </not>
+    </fail>
   </target>
 </project>
 

Added: ant/core/trunk/src/tests/antunit/taskdefs/xmlproperty.inline-expansion.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/xmlproperty.inline-expansion.xml?view=auto&rev=497387
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/xmlproperty.inline-expansion.xml (added)
+++ ant/core/trunk/src/tests/antunit/taskdefs/xmlproperty.inline-expansion.xml Thu Jan 18
02:33:30 2007
@@ -0,0 +1,16 @@
+<root-tag>
+  <!--used to check that the ordering of attribute expansion/eval is the order of
+  declaration in the build file, not alphabetical
+
+    expectations are
+      p : ${app.n}
+      n : n
+      o : n
+      m : n
+  -->
+  <app
+      p="${app.n}"
+      n="n"
+      o="${app.n}"
+      m="${app.n}"/>
+</root-tag>
\ No newline at end of file



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


Mime
View raw message