peterreilly 2003/10/14 02:00:06 Modified: src/etc/testcases/types Tag: ANT_16_BRANCH addtype.xml src/testcases/org/apache/tools/ant/types Tag: ANT_16_BRANCH AddTypeTest.java src/main/org/apache/tools/ant Tag: ANT_16_BRANCH UnknownElement.java Log: Merge with HEAD Revision Changes Path No revision No revision 1.2.2.1 +13 -3 ant/src/etc/testcases/types/addtype.xml Index: addtype.xml =================================================================== RCS file: /home/cvs/ant/src/etc/testcases/types/addtype.xml,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- addtype.xml 23 Jul 2003 12:13:58 -0000 1.2 +++ addtype.xml 14 Oct 2003 09:00:06 -0000 1.2.2.1 @@ -70,7 +70,7 @@ <typedef loaderref="nested.loader" classpathref="nested.classes" name = "myvalue" classname="${nested.package}AddTypeTest$MyValue"/> - </target> + </target> <target name="nested.a" depends="init"> <nested.container> @@ -83,7 +83,7 @@ <nested.b/> </nested.container> </target> - + <target name="nested.c" depends="init"> <nested.container> <nested.c/> @@ -102,18 +102,21 @@ <nested.condition.type/> <echo>after</echo> </target> + <target name="condition.task" depends="init"> <echo>before</echo> <nested.condition.task/> <echo>after</echo> </target> + <target name="condition.condition.type" depends="init"> <condition property="condition.condition.type"> <nested.condition.type/> </condition> </target> + <target name="condition.condition.task" depends="init"> - <condition property="condition.condition.task">> + <condition property="condition.condition.task"> <nested.condition.task/> </condition> </target> @@ -124,4 +127,11 @@ </myaddconfigured> </target> + <target name="namespacetest" xmlns:prefix="uri"> + <typedef name="eq" uri="uri" + classname="org.apache.tools.ant.taskdefs.condition.Equals"/> + <condition property="p"> + <prefix:eq arg1="a" arg2="b"/> + </condition> + </target> </project> No revision No revision 1.3.2.1 +5 -0 ant/src/testcases/org/apache/tools/ant/types/AddTypeTest.java Index: AddTypeTest.java =================================================================== RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/types/AddTypeTest.java,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -r1.3 -r1.3.2.1 --- AddTypeTest.java 23 Jul 2003 12:13:58 -0000 1.3 +++ AddTypeTest.java 14 Oct 2003 09:00:06 -0000 1.3.2.1 @@ -123,6 +123,11 @@ expectLogContaining( "myaddconfigured", "value is Value Setexecute: value is Value Set"); } + + public void testNamespace() { + executeTarget("namespacetest"); + } + // The following will be used as types and tasks public static interface A {} No revision No revision 1.63.2.2 +4 -1 ant/src/main/org/apache/tools/ant/UnknownElement.java Index: UnknownElement.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/UnknownElement.java,v retrieving revision 1.63.2.1 retrieving revision 1.63.2.2 diff -u -r1.63.2.1 -r1.63.2.2 --- UnknownElement.java 26 Sep 2003 10:31:12 -0000 1.63.2.1 +++ UnknownElement.java 14 Oct 2003 09:00:06 -0000 1.63.2.2 @@ -518,7 +518,10 @@ // backwards compatibility - element names of nested // elements have been all lower-case in Ant, except for // TaskContainers - String childName = child.getTag().toLowerCase(Locale.US); + // This does not work too good for typedefed elements... + String childName = + ProjectHelper.genComponentName( + child.getNamespace(), child.getTag().toLowerCase(Locale.US)); if (ih.supportsNestedElement(childName)) { IntrospectionHelper.Creator creator = ih.getElementCreator(getProject(), parent, childName);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]