Jeroen Hoffman pushed to branch master at cms-community / hippo-cms

Commits:
a4310ef5 by Jeroen Hoffman at 2016-10-03T15:53:39+02:00
CMS-10465 Replace hardcoded "\n" by system property 
"line.separator"

- - - - -


1 changed file:

- api/src/test/java/org/hippoecm/frontend/skin/IconUtilTest.java


Changes:

=====================================
api/src/test/java/org/hippoecm/frontend/skin/IconUtilTest.java
=====================================
--- a/api/src/test/java/org/hippoecm/frontend/skin/IconUtilTest.java
+++ b/api/src/test/java/org/hippoecm/frontend/skin/IconUtilTest.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2015 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2015-2016 Hippo B.V. (http://www.onehippo.com)
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -33,6 +33,8 @@ import static org.junit.Assert.assertThat;
 
 public class IconUtilTest extends WicketTester {
 
+    private static final String LINE_SEPARATOR = 
System.getProperty("line.separator");
+
     @Before
     public void setUp() {
         final IResourceSettings resourceSettings = 
Application.get().getResourceSettings();
@@ -57,15 +59,15 @@ public class IconUtilTest extends WicketTester {
     public void svg_as_string_from_resource_reference() throws Exception {
         String svgAsString = IconUtil.svgAsString(new 
PackageResourceReference("/test-SVG.svg"));
         assertThat(svgAsString, startsWith("<svg"));
-        assertThat(svgAsString, endsWith("</svg>\n"));
+        assertThat(svgAsString, endsWith("</svg>" + LINE_SEPARATOR));
 
         svgAsString = IconUtil.svgAsString(new 
PackageResourceReference("/test-SVG-with-simple-root-element.svg"));
         assertThat(svgAsString, startsWith("<svg"));
-        assertThat(svgAsString, endsWith("</svg>\n"));
+        assertThat(svgAsString, endsWith("</svg>" + LINE_SEPARATOR));
 
         svgAsString = IconUtil.svgAsString(new 
PackageResourceReference("/test-SVG-with-newline-after-root-element.svg"));
         assertThat(svgAsString, startsWith("<svg"));
-        assertThat(svgAsString, endsWith("</svg>\n"));
+        assertThat(svgAsString, endsWith("</svg>" + LINE_SEPARATOR));
     }
 
     @Test



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/a4310ef5fe930af5eb05926ca007c7230e5221c4
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to