summaryrefslogtreecommitdiffstats
path: root/theme-compiler/tests
diff options
context:
space:
mode:
Diffstat (limited to 'theme-compiler/tests')
-rw-r--r--theme-compiler/tests/resources/automatic/css/nested-selector-begin-with-plus.css9
-rw-r--r--theme-compiler/tests/resources/automatic/scss/nested-selector-begin-with-plus.scss9
-rw-r--r--theme-compiler/tests/resources/sasslang/css/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.css (renamed from theme-compiler/tests/resources/sasslangbroken/css/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.css)0
-rw-r--r--theme-compiler/tests/resources/sasslang/scss/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.scss (renamed from theme-compiler/tests/resources/sasslangbroken/scss/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.scss)0
-rw-r--r--theme-compiler/tests/resources/scss/mixin-extra-params.scss4
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/testcases/scss/MixinExtraParameters.java25
6 files changed, 47 insertions, 0 deletions
diff --git a/theme-compiler/tests/resources/automatic/css/nested-selector-begin-with-plus.css b/theme-compiler/tests/resources/automatic/css/nested-selector-begin-with-plus.css
new file mode 100644
index 0000000000..fa8d2861a6
--- /dev/null
+++ b/theme-compiler/tests/resources/automatic/css/nested-selector-begin-with-plus.css
@@ -0,0 +1,9 @@
+.v-panel {
+ display: block;
+ max-width: 84em;
+ margin: auto;
+}
+
+.v-panel + .abc {
+ margin-top: 1em;
+} \ No newline at end of file
diff --git a/theme-compiler/tests/resources/automatic/scss/nested-selector-begin-with-plus.scss b/theme-compiler/tests/resources/automatic/scss/nested-selector-begin-with-plus.scss
new file mode 100644
index 0000000000..f5a61b86ea
--- /dev/null
+++ b/theme-compiler/tests/resources/automatic/scss/nested-selector-begin-with-plus.scss
@@ -0,0 +1,9 @@
+.v-panel {
+ display: block;
+ max-width: 84em;
+ margin: auto;
+
+ + .abc {
+ margin-top: 1em;
+ }
+ } \ No newline at end of file
diff --git a/theme-compiler/tests/resources/sasslangbroken/css/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.css b/theme-compiler/tests/resources/sasslang/css/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.css
index 09b4ccac27..09b4ccac27 100644
--- a/theme-compiler/tests/resources/sasslangbroken/css/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.css
+++ b/theme-compiler/tests/resources/sasslang/css/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.css
diff --git a/theme-compiler/tests/resources/sasslangbroken/scss/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.scss b/theme-compiler/tests/resources/sasslang/scss/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.scss
index 73f6254f21..73f6254f21 100644
--- a/theme-compiler/tests/resources/sasslangbroken/scss/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.scss
+++ b/theme-compiler/tests/resources/sasslang/scss/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.scss
diff --git a/theme-compiler/tests/resources/scss/mixin-extra-params.scss b/theme-compiler/tests/resources/scss/mixin-extra-params.scss
new file mode 100644
index 0000000000..af376adf90
--- /dev/null
+++ b/theme-compiler/tests/resources/scss/mixin-extra-params.scss
@@ -0,0 +1,4 @@
+@mixin test ($p1) {
+ color: $p1;
+}
+@include test(foo, bar); \ No newline at end of file
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/MixinExtraParameters.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/MixinExtraParameters.java
new file mode 100644
index 0000000000..79c2ec366a
--- /dev/null
+++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/MixinExtraParameters.java
@@ -0,0 +1,25 @@
+package com.vaadin.sass.testcases.scss;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.vaadin.sass.AbstractTestBase;
+import com.vaadin.sass.internal.ScssStylesheet;
+
+public class MixinExtraParameters extends AbstractTestBase {
+ String scss = "/scss/mixin-extra-params.scss";
+
+ @Test
+ public void testCompiler() {
+ ScssStylesheet sheet;
+ try {
+ sheet = getStyleSheet(scss);
+ sheet.compile();
+ } catch (RuntimeException e) {
+ Assert.assertEquals(e.getMessage(),
+ "More parameters than expected, in Mixin test");
+ } catch (Exception e) {
+ Assert.fail();
+ }
+ }
+}