]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix test on Windows
authorSimon Steiner <ssteiner@apache.org>
Mon, 6 Apr 2020 10:51:47 +0000 (10:51 +0000)
committerSimon Steiner <ssteiner@apache.org>
Mon, 6 Apr 2020 10:51:47 +0000 (10:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1876180 13f79535-47bb-0310-9956-ffa450edef68

fop-core/src/test/java/org/apache/fop/render/ps/svg/GradientTestCase.java

index 908c603501ef8f144139742c9bd4377b2abc51f0..35b3bc9b7d3d33f4b2ff63d8021ad7225e6b7309 100644 (file)
@@ -68,9 +68,8 @@ public class GradientTestCase {
         svgGraphics2D.setGraphicContext(new GraphicContext());
         svgGraphics2D.translate(100, 100);
         svgGraphics2D.applyPaint(gradient, true);
-        byte[] actual = out.toByteArray();
-        byte[] expected = IOUtils.toByteArray(getClass().getResourceAsStream(expectedResourceName));
-        assertEquals(new String(expected, "US-ASCII"), new String(actual, "US-ASCII"));
+        String expected = IOUtils.toString(getClass().getResourceAsStream(expectedResourceName));
+        assertEquals(expected.replace("\r", ""), out.toString());
     }
 
 }