summaryrefslogtreecommitdiffstats
path: root/theme-compiler/tests
diff options
context:
space:
mode:
authorHaijian Wang <haijian@vaadin.com>2013-02-19 11:17:51 +0200
committerVaadin Code Review <review@vaadin.com>2013-02-19 10:16:38 +0000
commit821ebf49d898ba5f0e2f2e386de242b3dbcbe2e1 (patch)
tree370ee54321db44c581f30401835305534f4845b7 /theme-compiler/tests
parent638bb9263d867f300123acc9023f27ee242e6079 (diff)
downloadvaadin-framework-821ebf49d898ba5f0e2f2e386de242b3dbcbe2e1.tar.gz
vaadin-framework-821ebf49d898ba5f0e2f2e386de242b3dbcbe2e1.zip
more than expected params in mixin throws IOB exception. (Ticket #10988)
Change-Id: I6451c94a4f733b002165983f92c8577dac4904f6
Diffstat (limited to 'theme-compiler/tests')
-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
2 files changed, 29 insertions, 0 deletions
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();
+ }
+ }
+}