summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/sass/resources/basic/properties.css9
-rw-r--r--tests/sass/resources/css/semicolons.css9
-rw-r--r--tests/sass/resources/scss/semicolons.scss9
-rw-r--r--tests/sass/src/com/vaadin/sass/testcases/scss/Semicolons.java31
4 files changed, 51 insertions, 7 deletions
diff --git a/tests/sass/resources/basic/properties.css b/tests/sass/resources/basic/properties.css
index bdc17af233..946ee3a675 100644
--- a/tests/sass/resources/basic/properties.css
+++ b/tests/sass/resources/basic/properties.css
@@ -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;
@@ -15,11 +15,6 @@
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
index 0000000000..1471ce359a
--- /dev/null
+++ b/tests/sass/resources/css/semicolons.css
@@ -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
index 0000000000..a4a56043d5
--- /dev/null
+++ b/tests/sass/resources/scss/semicolons.scss
@@ -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
index 0000000000..d5b63489ea
--- /dev/null
+++ b/tests/sass/src/com/vaadin/sass/testcases/scss/Semicolons.java
@@ -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);
+ }
+}