diff options
author | denisanisimov <denis@vaadin.com> | 2014-01-13 10:24:58 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-01-28 08:21:30 +0000 |
commit | a5727e440003270ebf54f9f55abf5156143a580c (patch) | |
tree | fa4285d79fdbcb138214bf9b1e871cc37ae10925 /theme-compiler/tests | |
parent | 6cc39b3848e5dc4e678a6cf26afbd4542260827a (diff) | |
download | vaadin-framework-a5727e440003270ebf54f9f55abf5156143a580c.tar.gz vaadin-framework-a5727e440003270ebf54f9f55abf5156143a580c.zip |
Some tests are fixed on Win (CRLF issue).
Change-Id: I057bae0fd4068c6b877abdb9546ebf1490339d86
Diffstat (limited to 'theme-compiler/tests')
-rw-r--r-- | theme-compiler/tests/src/com/vaadin/sass/AbstractTestBase.java | 6 | ||||
-rw-r--r-- | theme-compiler/tests/src/com/vaadin/sass/testcases/scss/CompassImports.java | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/theme-compiler/tests/src/com/vaadin/sass/AbstractTestBase.java b/theme-compiler/tests/src/com/vaadin/sass/AbstractTestBase.java index d867e6ccd0..01187b4502 100644 --- a/theme-compiler/tests/src/com/vaadin/sass/AbstractTestBase.java +++ b/theme-compiler/tests/src/com/vaadin/sass/AbstractTestBase.java @@ -30,6 +30,8 @@ import com.vaadin.sass.internal.ScssStylesheet; public abstract class AbstractTestBase { + public static final String CR = "\r"; + protected ScssStylesheet stylesheet; protected String originalScss; protected String parsedScss; @@ -69,17 +71,21 @@ public abstract class AbstractTestBase { public void testParser(String file) throws CSSException, IOException, URISyntaxException { originalScss = getFileContent(file); + originalScss = originalScss.replaceAll(CR, ""); ScssStylesheet sheet = getStyleSheet(file); parsedScss = sheet.toString(); + parsedScss = parsedScss.replace(CR, ""); Assert.assertEquals("Original CSS and parsed CSS do not match", originalScss, parsedScss); } public void testCompiler(String scss, String css) throws Exception { comparisonCss = getFileContent(css); + comparisonCss = comparisonCss.replaceAll(CR, ""); ScssStylesheet sheet = getStyleSheet(scss); sheet.compile(); parsedScss = sheet.toString(); + parsedScss = parsedScss.replaceAll(CR, ""); Assert.assertEquals("Original CSS and parsed CSS do not match", comparisonCss, parsedScss); } diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/CompassImports.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/CompassImports.java index 1e3eb09f0c..4e87eb2197 100644 --- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/CompassImports.java +++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/CompassImports.java @@ -68,12 +68,14 @@ public class CompassImports extends AbstractTestBase { public void testCompiler(String scss, String css, String additionalPath) throws Exception { comparisonCss = getFileContent(css); + comparisonCss = comparisonCss.replaceAll(CR, ""); ScssStylesheet sheet = getStyleSheet(scss); Assert.assertNotNull(sheet); sheet.addResolver(new FilesystemResolver(additionalPath)); sheet.compile(); parsedScss = sheet.toString(); + parsedScss = parsedScss.replaceAll(CR, ""); Assert.assertEquals("Original CSS and parsed CSS do not match", comparisonCss, parsedScss); } |