git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@943072 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -115,6 +115,15 @@ | |||||
| </concat> | </concat> | ||||
| </target> | </target> | ||||
| <target name="testoverwrite"> | |||||
| <touch file="${tmp.file.2}"/> | |||||
| <!-- concat.xml is now older than tmp.file.2 | |||||
| so the following should still overwrite it --> | |||||
| <concat destfile="${tmp.file.2}" overwrite="true"> | |||||
| <path path="concat.xml"/> | |||||
| </concat> | |||||
| </target> | |||||
| <target name="testheaderfooter"> | <target name="testheaderfooter"> | ||||
| <concat> | <concat> | ||||
| <header filtering="false" trim="yes"> | <header filtering="false" trim="yes"> | ||||
| @@ -178,6 +178,13 @@ public class ConcatTest | |||||
| assertEquals(size, 0); | assertEquals(size, 0); | ||||
| } | } | ||||
| public void testOverwrite() { | |||||
| executeTarget("testoverwrite"); | |||||
| File file2 = new File(getProjectDir(), tempFile2); | |||||
| long size = file2.length(); | |||||
| assertTrue(size > 0); | |||||
| } | |||||
| public void testheaderfooter() { | public void testheaderfooter() { | ||||
| test3(); | test3(); | ||||
| expectLog("testheaderfooter", "headerHello, World!footer"); | expectLog("testheaderfooter", "headerHello, World!footer"); | ||||