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/testcases/org/apache/tools/ant/taskdefs MacroDefTest.java
Date Thu, 19 Feb 2004 12:31:44 GMT
peterreilly    2004/02/19 04:31:44

  Modified:    .        Tag: ANT_16_BRANCH WHATSNEW
               src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        MacroInstance.java
               src/etc/testcases/taskdefs Tag: ANT_16_BRANCH macrodef.xml
               src/testcases/org/apache/tools/ant/taskdefs Tag:
                        ANT_16_BRANCH MacroDefTest.java
  Log:
  Sync with HEAD
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.503.2.43 +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.503.2.42
  retrieving revision 1.503.2.43
  diff -u -r1.503.2.42 -r1.503.2.43
  --- WHATSNEW	17 Feb 2004 15:48:02 -0000	1.503.2.42
  +++ WHATSNEW	19 Feb 2004 12:31:43 -0000	1.503.2.43
  @@ -10,6 +10,9 @@
   
   * subant haltonfailure=false did not catch all failures. Bugzilla Report 27007.
   
  +* macrodef @@ escaping was broken.  Bugzilla Report 27069.
  +
  +
   
   Other changes:
   --------------
  
  
  
  No                   revision
  No                   revision
  1.5.2.17  +2 -14     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.16
  retrieving revision 1.5.2.17
  diff -u -r1.5.2.16 -r1.5.2.17
  --- MacroInstance.java	9 Feb 2004 22:12:18 -0000	1.5.2.16
  +++ MacroInstance.java	19 Feb 2004 12:31:43 -0000	1.5.2.17
  @@ -130,7 +130,6 @@
       private static final int STATE_NORMAL         = 0;
       private static final int STATE_EXPECT_BRACKET = 1;
       private static final int STATE_EXPECT_NAME    = 2;
  -    private static final int STATE_EXPECT_EXCAPE  = 3;
   
       private String macroSubs(String s, Map macroMapping) {
           if (s == null) {
  @@ -155,7 +154,8 @@
                           state = STATE_EXPECT_NAME;
                           macroName = new StringBuffer();
                       } else if (ch == '@') {
  -                        state = STATE_EXPECT_EXCAPE;
  +                        state = STATE_NORMAL;
  +                        ret.append('@');
                       } else {
                           state = STATE_NORMAL;
                           ret.append('@');
  @@ -177,15 +177,6 @@
                           macroName.append(ch);
                       }
                       break;
  -                case STATE_EXPECT_EXCAPE:
  -                    state = STATE_NORMAL;
  -                    if (ch == '{') {
  -                        ret.append("@");
  -                    } else {
  -                        ret.append("@@");
  -                    }
  -                    ret.append(ch);
  -                    break;
                   default:
                       break;
               }
  @@ -199,9 +190,6 @@
               case STATE_EXPECT_NAME:
                   ret.append("@{");
                   ret.append(macroName.toString());
  -                break;
  -            case STATE_EXPECT_EXCAPE:
  -                ret.append("@@");
                   break;
               default:
                   break;
  
  
  
  No                   revision
  No                   revision
  1.2.2.8   +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.7
  retrieving revision 1.2.2.8
  diff -u -r1.2.2.7 -r1.2.2.8
  --- macrodef.xml	27 Jan 2004 17:58:05 -0000	1.2.2.7
  +++ macrodef.xml	19 Feb 2004 12:31:43 -0000	1.2.2.8
  @@ -145,4 +145,15 @@
         </sequential>
       </macrodef>
     </target>
  +
  +  <target name="escape">
  +    <macrodef name="escape">
  +      <attribute name="a"/>
  +      <attribute name="b"/>
  +      <sequential>
  +        <echo>a@b or a@@b is @{a}@@@{b}</echo>
  +      </sequential>
  +    </macrodef>
  +    <escape a="avalue" b="bvalue"/>
  +  </target>
   </project>
  
  
  
  No                   revision
  No                   revision
  1.2.2.11  +5 -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.10
  retrieving revision 1.2.2.11
  diff -u -r1.2.2.10 -r1.2.2.11
  --- MacroDefTest.java	9 Feb 2004 22:12:47 -0000	1.2.2.10
  +++ MacroDefTest.java	19 Feb 2004 12:31:43 -0000	1.2.2.11
  @@ -99,5 +99,10 @@
               "duplicatetextname2",
               "the attribute name \"text\" has already been used by the text element");
       }
  +    public void testEscape() {
  +        expectLog(
  +            "escape",
  +            "a@b or a@b is avalue@bvalue");
  +    }
   }
   
  
  
  

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


Mime
View raw message