Browse Source

Make tests pass on MacOS X.

CVS: ----------------------------------------------------------------------
CVS: PR:
CVS:   If this change addresses a PR in the problem report tracking
CVS:   database, then enter the PR number(s) here.
CVS: Obtained from:
CVS:   If this change has been taken from another system, such as NCSA,
CVS:   then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS:   If this code has been contributed to Apache by someone else; i.e.,
CVS:   they sent us a patch or a new module, then include their name/email
CVS:   address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS:   If we are doing pre-commit code reviews and someone else has
CVS:   reviewed your changes, include their name(s) here.
CVS:   If you have not had it reviewed then delete this line.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276450 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 21 years ago
parent
commit
c7165c227d
2 changed files with 5 additions and 1 deletions
  1. +2
    -0
      src/etc/testcases/filters/concat.xml
  2. +3
    -1
      src/testcases/org/apache/tools/ant/filters/ConcatFilterTest.java

+ 2
- 0
src/etc/testcases/filters/concat.xml View File

@@ -7,6 +7,8 @@
<echo file="result/append.txt" message="this-should-be-the-last-line${line.separator}"/>
<copy file="input/head-tail.test" tofile="input/concatfilter.test"/>
<fixcrlf srcDir="input" includes="concatfilter.test"/>
<!-- to be consistent on MacOS X. fixcrlf uses CR while line.sep is LF -->
<fixcrlf srcDir="result" includes="append.txt,prepend.txt"/>
</target>

<target name="cleanup">


+ 3
- 1
src/testcases/org/apache/tools/ant/filters/ConcatFilterTest.java View File

@@ -21,6 +21,7 @@ import java.io.File;
import java.io.IOException;

import org.apache.tools.ant.BuildFileTest;
import org.apache.tools.ant.taskdefs.condition.Os;
import org.apache.tools.ant.util.FileUtils;

/**
@@ -29,7 +30,8 @@ import org.apache.tools.ant.util.FileUtils;
public class ConcatFilterTest extends BuildFileTest {

private static FileUtils fu = FileUtils.newFileUtils();
private static final String lSep = System.getProperty("line.separator");
private static final String lSep =
Os.isFamily("mac") ? "\r" : System.getProperty("line.separator");

private static final String FILE_PREPEND_WITH =
"this-should-be-the-first-line" + lSep


Loading…
Cancel
Save