git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272198 13f79535-47bb-0310-9956-ffa450edef68master
@@ -31,6 +31,19 @@ | |||||
quiet="true" /> | quiet="true" /> | ||||
</target> | </target> | ||||
<target name="tag-attribute"> | |||||
<mkdir dir="tmpdir" /> | |||||
<cvs cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic" | |||||
package="jakarta-ant/build.xml" | |||||
dest="tmpdir" | |||||
quiet="true" | |||||
tag="ANT_141" /> | |||||
<cvs cvsroot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic" | |||||
package="jakarta-ant/build.xml" | |||||
dest="tmpdir" | |||||
command="status"/> | |||||
</target> | |||||
<target name="cleanup"> | <target name="cleanup"> | ||||
<delete dir="tmpdir" /> | <delete dir="tmpdir" /> | ||||
</target> | </target> | ||||
@@ -377,7 +377,7 @@ public abstract class AbstractCvsTask extends Task { | |||||
String c = this.getCommand(); | String c = this.getCommand(); | ||||
if( c != null ) { | if( c != null ) { | ||||
this.cmd.createArgument().setLine(c); | |||||
this.cmd.createArgument(true).setLine(c); | |||||
this.addConfiguredCommandline( this.cmd, true ); | this.addConfiguredCommandline( this.cmd, true ); | ||||
} | } | ||||
@@ -115,7 +115,8 @@ public abstract class BuildFileTest extends TestCase { | |||||
protected void expectLogContaining(String target, String log) { | protected void expectLogContaining(String target, String log) { | ||||
executeTarget(target); | executeTarget(target); | ||||
String realLog = getLog(); | String realLog = getLog(); | ||||
assertTrue("expecting log to contain \""+log+"\"", | |||||
assertTrue("expecting log to contain \""+log+"\" log was \"" | |||||
+ realLog + "\"", | |||||
realLog.indexOf(log) >= 0); | realLog.indexOf(log) >= 0); | ||||
} | } | ||||
@@ -90,4 +90,11 @@ public class AbstractCvsTaskTest extends BuildFileTest { | |||||
expectLogContaining("package-attribute", "U jakarta-ant/build.xml"); | expectLogContaining("package-attribute", "U jakarta-ant/build.xml"); | ||||
assertTrue("now it is there", f.exists()); | assertTrue("now it is there", f.exists()); | ||||
} | } | ||||
public void testTagAttribute() { | |||||
File f = getProject().resolveFile("tmpdir/jakarta-ant/build.xml"); | |||||
assertTrue("starting empty", !f.exists()); | |||||
expectLogContaining("tag-attribute", "ANT_141 (revision: 1.175.2.13)"); | |||||
assertTrue("now it is there", f.exists()); | |||||
} | |||||
} | } |