anything. The older version depended upon the parser (does it invoke characters once per #PCDATA section or once per line). git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268024 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -326,5 +326,20 @@ | |||||
| <deltree dir="src/etc/testcases/taskdefs.tmp" /> | <deltree dir="src/etc/testcases/taskdefs.tmp" /> | ||||
| </target> | </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> | </project> | ||||
| @@ -423,7 +423,11 @@ public class ProjectHelper { | |||||
| RuntimeConfigurable parentWrapper) { | RuntimeConfigurable parentWrapper) { | ||||
| super(parentHandler); | super(parentHandler); | ||||
| this.target = target; | |||||
| if (target instanceof TaskAdapter) { | |||||
| this.target = ((TaskAdapter) target).getProxy(); | |||||
| } else { | |||||
| this.target = target; | |||||
| } | |||||
| this.parentWrapper = parentWrapper; | this.parentWrapper = parentWrapper; | ||||
| } | } | ||||
| @@ -538,7 +542,7 @@ public class ProjectHelper { | |||||
| */ | */ | ||||
| public static void addText(Object target, char[] buf, int start, int end) | public static void addText(Object target, char[] buf, int start, int end) | ||||
| throws BuildException { | throws BuildException { | ||||
| addText(target, new String(buf, start, end).trim()); | |||||
| addText(target, new String(buf, start, end)); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -547,7 +551,7 @@ public class ProjectHelper { | |||||
| public static void addText(Object target, String text) | public static void addText(Object target, String text) | ||||
| throws BuildException { | throws BuildException { | ||||
| if (text == null || text.length() == 0) { | |||||
| if (text == null || text.trim().length() == 0) { | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -123,7 +123,7 @@ public class RuntimeConfigurable { | |||||
| * Add characters from #PCDATA areas to the wrapped element. | * Add characters from #PCDATA areas to the wrapped element. | ||||
| */ | */ | ||||
| public void addText(char[] buf, int start, int end) { | public void addText(char[] buf, int start, int end) { | ||||
| addText(new String(buf, start, end).trim()); | |||||
| addText(new String(buf, start, end)); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -78,10 +78,12 @@ public class EchoTest extends TaskdefsTest { | |||||
| } | } | ||||
| public void test3() { | public void test3() { | ||||
| expectOutput("test3", "This \n"+ | |||||
| expectOutput("test3", "\n"+ | |||||
| " This \n"+ | |||||
| " is\n"+ | " is\n"+ | ||||
| " a \n"+ | " a \n"+ | ||||
| " multiline\n"+ | " multiline\n"+ | ||||
| " message\n"); | |||||
| " message\n"+ | |||||
| " \n"); | |||||
| } | } | ||||
| } | } | ||||