ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs EchoTest.java
Date Thu, 21 Sep 2000 07:19:52 GMT
bodewig     00/09/21 00:19:51

  Modified:    .        build.xml
               src/main/org/apache/tools/ant ProjectHelper.java
                        RuntimeConfigurable.java
               src/testcases/org/apache/tools/ant/taskdefs EchoTest.java
  Log:
  Make the handling of nested #PCDATA more predictable by not stripping
  anything. The older version depended upon the parser (does it invoke
  characters once per #PCDATA section or once per line).
  
  Revision  Changes    Path
  1.79      +15 -0     jakarta-ant/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/build.xml,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- build.xml	2000/09/20 13:38:46	1.78
  +++ build.xml	2000/09/21 07:19:47	1.79
  @@ -326,5 +326,20 @@
       <deltree dir="src/etc/testcases/taskdefs.tmp" />
     </target>
   
  +  <target name="run.single.test" if="testcase" depends="compiletests">
  +    <junit printsummary="no" fork="yes" haltonfailure="yes">
  +      <classpath>
  +        <pathelement location="${lib.dir}/${name}.jar" />
  +        <pathelement location="${build.tests}" />
  +        <path refid="classpath" />
  +        <pathelement path="${java.class.path}" />
  +      </classpath>
  +
  +      <formatter type="plain" usefile="false" />
  +
  +      <test name="${testcase}" />
  +    </junit>
  +  </target>
  +
   </project>
   
  
  
  
  1.32      +7 -3      jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
  
  Index: ProjectHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- ProjectHelper.java	2000/09/20 11:31:12	1.31
  +++ ProjectHelper.java	2000/09/21 07:19:48	1.32
  @@ -423,7 +423,11 @@
                                       RuntimeConfigurable parentWrapper) {
               super(parentHandler);
   
  -            this.target = target;
  +            if (target instanceof TaskAdapter) {
  +                this.target = ((TaskAdapter) target).getProxy();
  +            } else {
  +                this.target = target;
  +            }
               this.parentWrapper = parentWrapper;
           }
   
  @@ -538,7 +542,7 @@
        */
       public static void addText(Object target, char[] buf, int start, int end)
           throws BuildException {
  -        addText(target, new String(buf, start, end).trim());
  +        addText(target, new String(buf, start, end));
       }
   
       /**
  @@ -547,7 +551,7 @@
       public static void addText(Object target, String text)
           throws BuildException {
   
  -        if (text == null || text.length() == 0) {
  +        if (text == null || text.trim().length() == 0) {
               return;
           }
   
  
  
  
  1.3       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java
  
  Index: RuntimeConfigurable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RuntimeConfigurable.java	2000/09/18 14:04:51	1.2
  +++ RuntimeConfigurable.java	2000/09/21 07:19:49	1.3
  @@ -123,7 +123,7 @@
        * Add characters from #PCDATA areas to the wrapped element.
        */
       public void addText(char[] buf, int start, int end) {
  -        addText(new String(buf, start, end).trim());
  +        addText(new String(buf, start, end));
       }
   
       /**
  
  
  
  1.2       +4 -2      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/EchoTest.java
  
  Index: EchoTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/EchoTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EchoTest.java	2000/09/20 13:38:50	1.1
  +++ EchoTest.java	2000/09/21 07:19:50	1.2
  @@ -78,10 +78,12 @@
       }
       
       public void test3() { 
  -        expectOutput("test3", "This \n"+
  +        expectOutput("test3", "\n"+
  +                              "    This \n"+
                                 "    is\n"+
                                 "    a \n"+
                                 "    multiline\n"+
  -                              "    message\n");
  +                              "    message\n"+
  +                              "    \n");
       }
   }
  
  
  

Mime
View raw message