ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/etc/testcases/taskdefs macrodef.xml
Date Mon, 22 Dec 2003 10:08:58 GMT
peterreilly    2003/12/22 02:08:58

  Modified:    docs/manual/CoreTasks Tag: ANT_16_BRANCH macrodef.html
               src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        MacroDef.java MacroInstance.java
               src/testcases/org/apache/tools/ant/taskdefs Tag:
                        ANT_16_BRANCH MacroDefTest.java
               src/etc/testcases/taskdefs Tag: ANT_16_BRANCH macrodef.xml
  Log:
  Sync with HEAD
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.2.2.6   +5 -1      ant/docs/manual/CoreTasks/macrodef.html
  
  Index: macrodef.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/CoreTasks/macrodef.html,v
  retrieving revision 1.2.2.5
  retrieving revision 1.2.2.6
  diff -u -r1.2.2.5 -r1.2.2.6
  --- macrodef.html	3 Dec 2003 13:22:30 -0000	1.2.2.5
  +++ macrodef.html	22 Dec 2003 10:08:58 -0000	1.2.2.6
  @@ -60,7 +60,11 @@
         AT this location").
         The escape sequence @@{x} is used to allow @{x} to be
         placed in the text without substitution of x.
  -      This corresponds to the $${x} escape sequence for properties
  +      This corresponds to the $${x} escape sequence for properties.
  +    </p>
  +    <p>
  +      The case of the attribute is ignored, so @{myAttribute} is treated the
  +      same as @{MyAttribute}.
       </p>
       <h3>Parameters</h3>
       <table border="1" cellpadding="2" cellspacing="0">
  
  
  
  No                   revision
  No                   revision
  1.7.2.8   +2 -1      ant/src/main/org/apache/tools/ant/taskdefs/MacroDef.java
  
  Index: MacroDef.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/MacroDef.java,v
  retrieving revision 1.7.2.7
  retrieving revision 1.7.2.8
  diff -u -r1.7.2.7 -r1.7.2.8
  --- MacroDef.java	3 Dec 2003 13:22:30 -0000	1.7.2.7
  +++ MacroDef.java	22 Dec 2003 10:08:58 -0000	1.7.2.8
  @@ -57,6 +57,7 @@
   import java.util.ArrayList;
   import java.util.List;
   import java.util.Map;
  +import java.util.Locale;
   import java.util.HashMap;
   
   import org.apache.tools.ant.AntTypeDefinition;
  @@ -293,7 +294,7 @@
                   throw new BuildException(
                       "Illegal name [" + name + "] for attribute");
               }
  -            this.name = name;
  +            this.name = name.toLowerCase(Locale.US);
           }
   
           /**
  
  
  
  1.5.2.9   +2 -1      ant/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java
  
  Index: MacroInstance.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java,v
  retrieving revision 1.5.2.8
  retrieving revision 1.5.2.9
  diff -u -r1.5.2.8 -r1.5.2.9
  --- MacroInstance.java	16 Dec 2003 21:19:26 -0000	1.5.2.8
  +++ MacroInstance.java	22 Dec 2003 10:08:58 -0000	1.5.2.9
  @@ -57,6 +57,7 @@
   import java.util.ArrayList;
   import java.util.List;
   import java.util.Iterator;
  +import java.util.Locale;
   import java.util.Map;
   import java.util.Set;
   import java.util.HashSet;
  @@ -200,7 +201,7 @@
                   case STATE_EXPECT_NAME:
                       if (ch == '}') {
                           state = STATE_NORMAL;
  -                        String name = macroName.toString();
  +                        String name = macroName.toString().toLowerCase(Locale.US);
                           String value = (String) macroMapping.get(name);
                           if (value == null) {
                               ret.append("@{" + name + "}");
  
  
  
  No                   revision
  No                   revision
  1.2.2.4   +6 -0      ant/src/testcases/org/apache/tools/ant/taskdefs/MacroDefTest.java
  
  Index: MacroDefTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/MacroDefTest.java,v
  retrieving revision 1.2.2.3
  retrieving revision 1.2.2.4
  diff -u -r1.2.2.3 -r1.2.2.4
  --- MacroDefTest.java	3 Dec 2003 13:22:30 -0000	1.2.2.3
  +++ MacroDefTest.java	22 Dec 2003 10:08:58 -0000	1.2.2.4
  @@ -103,5 +103,11 @@
               "double",
               "@{prop} is 'property', value of ${property} is 'A property value'");
       }
  +
  +    public void testIgnoreCase() {
  +        expectLog(
  +            "ignorecase",
  +            "a is ab is b");
  +    }
   }
   
  
  
  
  No                   revision
  No                   revision
  1.2.2.4   +11 -0     ant/src/etc/testcases/taskdefs/macrodef.xml
  
  Index: macrodef.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/macrodef.xml,v
  retrieving revision 1.2.2.3
  retrieving revision 1.2.2.4
  diff -u -r1.2.2.3 -r1.2.2.4
  --- macrodef.xml	3 Dec 2003 13:22:30 -0000	1.2.2.3
  +++ macrodef.xml	22 Dec 2003 10:08:58 -0000	1.2.2.4
  @@ -75,4 +75,15 @@
       <property name="property" value="A property value"/>
       <double prop="property"/>
     </target>
  +
  +  <target name="ignorecase">
  +    <macrodef name="ignore">
  +      <attribute name="MyAttribute"/>
  +      <sequential>
  +        <echo>@{myattribute} is @{MYATTRIBUTE}</echo>
  +      </sequential>
  +    </macrodef>
  +    <ignore myattribute="a"/>
  +    <ignore Myattribute="b"/>
  +  </target>
   </project>
  
  
  

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


Mime
View raw message