]> source.dussan.org Git - vaadin-framework.git/commitdiff
Split semicolon related issues to a separate test (#9223)
authorHenri Sara <hesara@vaadin.com>
Thu, 9 Aug 2012 07:43:25 +0000 (10:43 +0300)
committerHenri Sara <hesara@vaadin.com>
Thu, 9 Aug 2012 07:43:25 +0000 (10:43 +0300)
tests/sass/resources/basic/properties.css
tests/sass/resources/css/semicolons.css [new file with mode: 0644]
tests/sass/resources/scss/semicolons.scss [new file with mode: 0644]
tests/sass/src/com/vaadin/sass/testcases/scss/Semicolons.java [new file with mode: 0644]

index bdc17af2332bb89079e2a41812460d9c67c41f33..946ee3a6757b77e3f39692b4d3267bd2e5937922 100644 (file)
@@ -1,6 +1,6 @@
 .all-the-properties {
-       font-family: Arial, Helvetica, "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; ;
-       position: absolute;;
+       font-family: Arial, Helvetica, "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
+       position: absolute;
        overflow: hidden;
        outline: none;
        text-align: left;
        display: inline-block;
 }
 
-.missing-semicolon-on-last-row {
-       color: red;
-       background-color: blue
-}
-
 .lexical-value-test {
        margin: none;
        margin: 0px;
diff --git a/tests/sass/resources/css/semicolons.css b/tests/sass/resources/css/semicolons.css
new file mode 100644 (file)
index 0000000..1471ce3
--- /dev/null
@@ -0,0 +1,9 @@
+.all-the-properties {
+       font-family: Arial, Helvetica, "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
+       position: absolute;
+       overflow: hidden;
+}
+.missing-semicolon-on-last-row {
+       color: red;
+       background-color: blue;
+}
diff --git a/tests/sass/resources/scss/semicolons.scss b/tests/sass/resources/scss/semicolons.scss
new file mode 100644 (file)
index 0000000..a4a5604
--- /dev/null
@@ -0,0 +1,9 @@
+.all-the-properties {
+       font-family: Arial, Helvetica, "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; ;
+       position: absolute;;
+       overflow: hidden;
+}
+.missing-semicolon-on-last-row {
+       color: red;
+       background-color: blue
+}
diff --git a/tests/sass/src/com/vaadin/sass/testcases/scss/Semicolons.java b/tests/sass/src/com/vaadin/sass/testcases/scss/Semicolons.java
new file mode 100644 (file)
index 0000000..d5b6348
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+
+package com.vaadin.sass.testcases.scss;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import junit.framework.Assert;
+
+import org.junit.Test;
+import org.w3c.css.sac.CSSException;
+
+import com.vaadin.sass.AbstractTestBase;
+
+/**
+ * Test for missing and extraneous semicolon handling.
+ */
+public class Semicolons extends AbstractTestBase {
+    String scss = "/scss/semicolons.scss";
+    String css = "/scss/semicolons.css";
+
+    @Test
+    public void testCompiler() throws CSSException, URISyntaxException,
+            IOException {
+        testCompiler(scss, css);
+        Assert.assertEquals("Original CSS and parsed CSS doesn't match",
+                comparisonCss, parsedScss);
+    }
+}