Index: tests/struts_test/src/org/apache/harmony/struts/test/WebAppTest.java =================================================================== --- tests/struts_test/src/org/apache/harmony/struts/test/WebAppTest.java (revision 543182) +++ tests/struts_test/src/org/apache/harmony/struts/test/WebAppTest.java (working copy) @@ -153,8 +153,6 @@ */ public class WebAppTest { - private static final String SPLIT_PATTERN = "\\r\\n"; - private static final String ACTION_URL = "URL"; private static final String ACTION_ANCHOR = "ANCHOR"; private static final String ACTION_FORM = "FORM"; @@ -611,8 +609,8 @@ return; } // Compare line by line - String[] localLines = expected.split(SPLIT_PATTERN); - String[] remoteLines = resp.split(SPLIT_PATTERN); + String[] localLines = fixEOL(expected).split("\\n"); + String[] remoteLines = fixEOL(resp).split("\\n"); String failureMessage = ""; if (localLines.length != remoteLines.length) { failed = true; @@ -654,6 +652,9 @@ } } // check that there was no lines mismatches + if (failed) { + System.out.println(failureMessage); + } Assert.assertFalse(failureMessage, failed); } finally { if (localStream != null) { @@ -662,6 +663,17 @@ } } + private String fixEOL(String text) { + String fixed = text; + if (fixed.indexOf("\r\n") >= 0) { + fixed = fixed.replaceAll("\\r\\n", "\n"); + } + if (fixed.indexOf("\r") >= 0) { + fixed = fixed.replaceAll("\\r", "\n"); + } + return fixed; + } + /** * Compares lines containing href values allowing different order * of the same parameters in href's query string Index: tests/struts_test/resources/showcase/compare.patterns.properties =================================================================== --- tests/struts_test/resources/showcase/compare.patterns.properties (revision 543182) +++ tests/struts_test/resources/showcase/compare.patterns.properties (working copy) @@ -50,4 +50,6 @@ 0120.[AP]M : 0130.[A-Z][a-z]{2}\ [A-Z][a-z]{2}\ [0-9]{2} 0140.[A-Z]{4,5}\ [0-9]{4} -0150.