diff options
author | joheriks <joheriks@vaadin.com> | 2013-11-27 17:34:30 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-11-28 07:59:15 +0000 |
commit | 37919d14b7509b1c8d8495a3e334d50a913bfe6f (patch) | |
tree | 4ff44578c4e22d98a07e79c2a778aa2b266c0021 /theme-compiler/tests/resources/sasslang/scss | |
parent | 1ac492e46b70de9314083492bd8e136e1c8398e3 (diff) | |
download | vaadin-framework-37919d14b7509b1c8d8495a3e334d50a913bfe6f.tar.gz vaadin-framework-37919d14b7509b1c8d8495a3e334d50a913bfe6f.zip |
For @-directives, infer missing semicolon before closing brace (#12792)
Parser now accepts the following (note missing semicolon after last
@extend-directive):
xyzzy {
@extend foo ;
@extend bar
}
As a consequence, moved 31 sasslang-cases from broken to fixed. Moved
two tests from fixed to broken (34, 95, previously passed accidentally)
Change-Id: I8968074abd79dec71be762ed926cc6f37fbcaa99
Diffstat (limited to 'theme-compiler/tests/resources/sasslang/scss')
30 files changed, 67 insertions, 3 deletions
diff --git a/theme-compiler/tests/resources/sasslang/scss/106-test_pseudoclass_remains_at_end_of_selector.scss b/theme-compiler/tests/resources/sasslang/scss/106-test_pseudoclass_remains_at_end_of_selector.scss new file mode 100644 index 0000000000..619bbb51cd --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/106-test_pseudoclass_remains_at_end_of_selector.scss @@ -0,0 +1,2 @@ +.foo:bar {a: b} +.baz {@extend .foo} diff --git a/theme-compiler/tests/resources/sasslang/scss/107-test_pseudoelement_goes_lefter_than_not.scss b/theme-compiler/tests/resources/sasslang/scss/107-test_pseudoelement_goes_lefter_than_not.scss new file mode 100644 index 0000000000..f50ad04b12 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/107-test_pseudoelement_goes_lefter_than_not.scss @@ -0,0 +1,2 @@ +.foo::bar {a: b} +.baz:not(.bang) {@extend .foo} diff --git a/theme-compiler/tests/resources/sasslang/scss/108-test_pseudoelement_goes_lefter_than_pseudoclass.scss b/theme-compiler/tests/resources/sasslang/scss/108-test_pseudoelement_goes_lefter_than_pseudoclass.scss new file mode 100644 index 0000000000..230f925a10 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/108-test_pseudoelement_goes_lefter_than_pseudoclass.scss @@ -0,0 +1,2 @@ +.foo::bar {a: b} +.baz:bang {@extend .foo} diff --git a/theme-compiler/tests/resources/sasslang/scss/109-test_pseudoelement_remains_at_end_of_selector.scss b/theme-compiler/tests/resources/sasslang/scss/109-test_pseudoelement_remains_at_end_of_selector.scss new file mode 100644 index 0000000000..cd588ed24a --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/109-test_pseudoelement_remains_at_end_of_selector.scss @@ -0,0 +1,2 @@ +.foo::bar {a: b} +.baz {@extend .foo} diff --git a/theme-compiler/tests/resources/sasslang/scss/110-test_redundant_selector_elimination.scss b/theme-compiler/tests/resources/sasslang/scss/110-test_redundant_selector_elimination.scss new file mode 100644 index 0000000000..ab8ba4845f --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/110-test_redundant_selector_elimination.scss @@ -0,0 +1,3 @@ +.foo.bar {a: b} +.x {@extend .foo, .bar} +.y {@extend .foo, .bar} diff --git a/theme-compiler/tests/resources/sasslang/scss/112-test_target_with_child.scss b/theme-compiler/tests/resources/sasslang/scss/112-test_target_with_child.scss new file mode 100644 index 0000000000..3748f64233 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/112-test_target_with_child.scss @@ -0,0 +1,2 @@ +.foo .bar {a: b} +.baz {@extend .foo} diff --git a/theme-compiler/tests/resources/sasslang/scss/2-test_basic.scss b/theme-compiler/tests/resources/sasslang/scss/2-test_basic.scss new file mode 100644 index 0000000000..9f3cde0011 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/2-test_basic.scss @@ -0,0 +1,2 @@ +.foo {a: b} +.bar {@extend .foo} diff --git a/theme-compiler/tests/resources/sasslang/scss/29-test_extend_does_not_warn_when_one_extension_fails_but_others_dont.scss b/theme-compiler/tests/resources/sasslang/scss/29-test_extend_does_not_warn_when_one_extension_fails_but_others_dont.scss new file mode 100644 index 0000000000..a5a0dff1d0 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/29-test_extend_does_not_warn_when_one_extension_fails_but_others_dont.scss @@ -0,0 +1,3 @@ +a.bar {a: b} +.bar {c: d} +b.foo {@extend .bar} diff --git a/theme-compiler/tests/resources/sasslang/scss/33-test_extend_redundancy_elimination_never_eliminates_base_selector.scss b/theme-compiler/tests/resources/sasslang/scss/33-test_extend_redundancy_elimination_never_eliminates_base_selector.scss new file mode 100644 index 0000000000..ac6ad58994 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/33-test_extend_redundancy_elimination_never_eliminates_base_selector.scss @@ -0,0 +1,2 @@ +a.foo {a: b} +.foo {@extend a} diff --git a/theme-compiler/tests/resources/sasslang/scss/333-test_empty_content.scss b/theme-compiler/tests/resources/sasslang/scss/333-test_empty_content.scss new file mode 100644 index 0000000000..ad8df41f25 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/333-test_empty_content.scss @@ -0,0 +1,2 @@ +@mixin foo { @content } +a { b: c; @include foo {} } diff --git a/theme-compiler/tests/resources/sasslang/scss/34-test_extend_redundancy_elimination_when_it_would_preserve_specificity.scss b/theme-compiler/tests/resources/sasslang/scss/35-test_extend_redundancy_elimination_when_it_would_reduce_specificity.scss index 713644b221..30a9d092cb 100644 --- a/theme-compiler/tests/resources/sasslang/scss/34-test_extend_redundancy_elimination_when_it_would_preserve_specificity.scss +++ b/theme-compiler/tests/resources/sasslang/scss/35-test_extend_redundancy_elimination_when_it_would_reduce_specificity.scss @@ -1,2 +1,2 @@ -.bar a {a: b} +a {a: b} a.foo {@extend a} diff --git a/theme-compiler/tests/resources/sasslang/scss/368-test_mixins_with_args.scss b/theme-compiler/tests/resources/sasslang/scss/368-test_mixins_with_args.scss new file mode 100644 index 0000000000..3ba39ecac2 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/368-test_mixins_with_args.scss @@ -0,0 +1,3 @@ +@mixin foo($a) {a: $a} + +.foo {@include foo(bar)} diff --git a/theme-compiler/tests/resources/sasslang/scss/420-test_warn_directive.scss b/theme-compiler/tests/resources/sasslang/scss/420-test_warn_directive.scss new file mode 100644 index 0000000000..53546355cc --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/420-test_warn_directive.scss @@ -0,0 +1,3 @@ +@mixin foo { @warn "this is a mixin";} +@warn "this is a warning"; +bar {c: d; @include foo;} diff --git a/theme-compiler/tests/resources/sasslang/scss/55-test_long_extendee.scss b/theme-compiler/tests/resources/sasslang/scss/55-test_long_extendee.scss new file mode 100644 index 0000000000..26ab65d344 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/55-test_long_extendee.scss @@ -0,0 +1,2 @@ +.foo.bar {a: b} +.baz {@extend .foo.bar} diff --git a/theme-compiler/tests/resources/sasslang/scss/63-test_multiple_extendees.scss b/theme-compiler/tests/resources/sasslang/scss/63-test_multiple_extendees.scss new file mode 100644 index 0000000000..2c0f5aa72a --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/63-test_multiple_extendees.scss @@ -0,0 +1,3 @@ +.foo {a: b} +.bar {c: d} +.baz {@extend .foo; @extend .bar} diff --git a/theme-compiler/tests/resources/sasslang/scss/65-test_multiple_extends_with_multiple_extenders_and_single_target.scss b/theme-compiler/tests/resources/sasslang/scss/65-test_multiple_extends_with_multiple_extenders_and_single_target.scss new file mode 100644 index 0000000000..4c2a4c59f8 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/65-test_multiple_extends_with_multiple_extenders_and_single_target.scss @@ -0,0 +1,3 @@ +.foo .bar {a: b} +.baz {@extend .foo} +.bang {@extend .bar} diff --git a/theme-compiler/tests/resources/sasslang/scss/66-test_multiple_extends_with_single_extender_and_single_target.scss b/theme-compiler/tests/resources/sasslang/scss/66-test_multiple_extends_with_single_extender_and_single_target.scss new file mode 100644 index 0000000000..48d9c5b733 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/66-test_multiple_extends_with_single_extender_and_single_target.scss @@ -0,0 +1,2 @@ +.foo .bar {a: b} +.baz {@extend .foo; @extend .bar} diff --git a/theme-compiler/tests/resources/sasslang/scss/67-test_multiple_targets.scss b/theme-compiler/tests/resources/sasslang/scss/67-test_multiple_targets.scss new file mode 100644 index 0000000000..fdcba65999 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/67-test_multiple_targets.scss @@ -0,0 +1,3 @@ +.foo {a: b} +.bar {@extend .foo} +.blip .foo {c: d} diff --git a/theme-compiler/tests/resources/sasslang/scss/7-test_combinator_unification_angle_sibling.scss b/theme-compiler/tests/resources/sasslang/scss/7-test_combinator_unification_angle_sibling.scss new file mode 100644 index 0000000000..b0120ac34e --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/7-test_combinator_unification_angle_sibling.scss @@ -0,0 +1,2 @@ +.a > x {a: b} +.b ~ y {@extend x} diff --git a/theme-compiler/tests/resources/sasslang/scss/70-test_nested_extender.scss b/theme-compiler/tests/resources/sasslang/scss/70-test_nested_extender.scss new file mode 100644 index 0000000000..6245cdfda7 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/70-test_nested_extender.scss @@ -0,0 +1,2 @@ +.foo {a: b} +foo bar {@extend .foo} diff --git a/theme-compiler/tests/resources/sasslang/scss/80-test_nested_extender_merges_with_same_selector.scss b/theme-compiler/tests/resources/sasslang/scss/80-test_nested_extender_merges_with_same_selector.scss new file mode 100644 index 0000000000..d959cce374 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/80-test_nested_extender_merges_with_same_selector.scss @@ -0,0 +1,3 @@ +.foo { + .bar {a: b} + .baz {@extend .bar} } diff --git a/theme-compiler/tests/resources/sasslang/scss/81-test_nested_extender_runs_unification.scss b/theme-compiler/tests/resources/sasslang/scss/81-test_nested_extender_runs_unification.scss new file mode 100644 index 0000000000..32c2c0cc62 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/81-test_nested_extender_runs_unification.scss @@ -0,0 +1,2 @@ +.foo.bar {a: b} +foo bar {@extend .foo} diff --git a/theme-compiler/tests/resources/sasslang/scss/85-test_nested_extender_with_child_selector.scss b/theme-compiler/tests/resources/sasslang/scss/85-test_nested_extender_with_child_selector.scss new file mode 100644 index 0000000000..da249ad564 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/85-test_nested_extender_with_child_selector.scss @@ -0,0 +1,2 @@ +.baz .foo {a: b} +foo > bar {@extend .foo} diff --git a/theme-compiler/tests/resources/sasslang/scss/86-test_nested_extender_with_child_selector_merges_with_same_selector.scss b/theme-compiler/tests/resources/sasslang/scss/86-test_nested_extender_with_child_selector_merges_with_same_selector.scss new file mode 100644 index 0000000000..224945cd71 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/86-test_nested_extender_with_child_selector_merges_with_same_selector.scss @@ -0,0 +1,2 @@ +.foo > .bar .baz {a: b} +.foo > .bar .bang {@extend .baz} diff --git a/theme-compiler/tests/resources/sasslang/scss/88-test_nested_extender_with_early_child_selectors_doesnt_subseq_them.scss b/theme-compiler/tests/resources/sasslang/scss/88-test_nested_extender_with_early_child_selectors_doesnt_subseq_them.scss new file mode 100644 index 0000000000..f2b8c6c07b --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/88-test_nested_extender_with_early_child_selectors_doesnt_subseq_them.scss @@ -0,0 +1,4 @@ +.foo { + .bar {a: b} + .bip > .baz {@extend .bar} +} diff --git a/theme-compiler/tests/resources/sasslang/scss/90-test_nested_extender_with_sibling_selector.scss b/theme-compiler/tests/resources/sasslang/scss/90-test_nested_extender_with_sibling_selector.scss new file mode 100644 index 0000000000..b9d495ce76 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/90-test_nested_extender_with_sibling_selector.scss @@ -0,0 +1,2 @@ +.baz .foo {a: b} +foo + bar {@extend .foo} diff --git a/theme-compiler/tests/resources/sasslang/scss/91-test_nested_selector_with_child_selector_hack_extendee.scss b/theme-compiler/tests/resources/sasslang/scss/91-test_nested_selector_with_child_selector_hack_extendee.scss new file mode 100644 index 0000000000..928bc64f93 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/91-test_nested_selector_with_child_selector_hack_extendee.scss @@ -0,0 +1,2 @@ +> .foo {a: b} +foo bar {@extend .foo} diff --git a/theme-compiler/tests/resources/sasslang/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 deleted file mode 100644 index 73f6254f21..0000000000 --- a/theme-compiler/tests/resources/sasslang/scss/95-test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee.scss +++ /dev/null @@ -1,2 +0,0 @@ -~ .foo {a: b} -> foo bar {@extend .foo} diff --git a/theme-compiler/tests/resources/sasslang/scss/96-test_nested_target.scss b/theme-compiler/tests/resources/sasslang/scss/96-test_nested_target.scss new file mode 100644 index 0000000000..6662dea791 --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/96-test_nested_target.scss @@ -0,0 +1,2 @@ +.foo .bar {a: b} +.baz {@extend .bar} diff --git a/theme-compiler/tests/resources/sasslang/scss/98-test_not_remains_at_end_of_selector.scss b/theme-compiler/tests/resources/sasslang/scss/98-test_not_remains_at_end_of_selector.scss new file mode 100644 index 0000000000..c1af8b1b2a --- /dev/null +++ b/theme-compiler/tests/resources/sasslang/scss/98-test_not_remains_at_end_of_selector.scss @@ -0,0 +1,2 @@ +.foo:not(.bar) {a: b} +.baz {@extend .foo} |