diff --git a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/nonvisualregressiontests/NonVisualRegressionTest.java b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/nonvisualregressiontests/NonVisualRegressionTest.java index f9b8b9a12..f9f2a6e90 100644 --- a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/nonvisualregressiontests/NonVisualRegressionTest.java +++ b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/nonvisualregressiontests/NonVisualRegressionTest.java @@ -808,7 +808,10 @@ public void testIssue458PageContentRepeatedInMargin() throws IOException { "Two\r\n" + "Three"; - assertEquals(expected.trim(), text.trim()); + String normalizedExpected = expected.replaceAll("(\\r|\\r\\n|\\n)", System.lineSeparator()); + String normalizedActual = text.replaceAll("(\\r|\\r\\n|\\n)", System.lineSeparator()); + + assertEquals(normalizedExpected.trim(), normalizedActual.trim()); } }