From c7165c227de1d82933e69264bb33910bde907cdb Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 13 May 2004 07:01:49 +0000 Subject: [PATCH] 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 --- src/etc/testcases/filters/concat.xml | 2 ++ .../org/apache/tools/ant/filters/ConcatFilterTest.java | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/etc/testcases/filters/concat.xml b/src/etc/testcases/filters/concat.xml index 2c611828d..48618247f 100644 --- a/src/etc/testcases/filters/concat.xml +++ b/src/etc/testcases/filters/concat.xml @@ -7,6 +7,8 @@ + + diff --git a/src/testcases/org/apache/tools/ant/filters/ConcatFilterTest.java b/src/testcases/org/apache/tools/ant/filters/ConcatFilterTest.java index 28cb4408c..db6f67b9c 100644 --- a/src/testcases/org/apache/tools/ant/filters/ConcatFilterTest.java +++ b/src/testcases/org/apache/tools/ant/filters/ConcatFilterTest.java @@ -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