Skip to content

Commit ae7d9f6

Browse files
committed
Test case for selector-unify() function #310
1 parent ccf9951 commit ae7d9f6

3 files changed

Lines changed: 60 additions & 0 deletions

File tree

tests/inputs/selector_functions.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,27 @@
122122
content:"#{$part}";
123123
}
124124
}
125+
126+
#{selector-unify("a", ".disabled")} {
127+
content:"a.disabled";
128+
}
129+
130+
#{selector-unify("a.disabled", "a.outgoing")} {
131+
content: "a.disabled.outgoing";
132+
}
133+
134+
#{selector-unify("a", "h1")} {
135+
content: "null";
136+
}
137+
138+
#{selector-unify(".warning a", "main a")} {
139+
content: ".warning main a, main .warning a";
140+
}
141+
142+
#{selector-unify("main.warning a", "main a.disabled")} {
143+
content: "main.warning a.disabled";
144+
}
145+
146+
#{selector-unify("main .warning a", "main a")} {
147+
content: "main .warning a";
148+
}

tests/outputs/selector_functions.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,21 @@ main, .blog, :after {
106106
content: "main";
107107
content: ".blog";
108108
content: ":after"; }
109+
110+
a.disabled {
111+
content: "a.disabled"; }
112+
113+
a.disabled.outgoing {
114+
content: "a.disabled.outgoing"; }
115+
116+
{
117+
content: "null"; }
118+
119+
.warning main a, main .warning a {
120+
content: ".warning main a, main .warning a"; }
121+
122+
main.warning a.disabled {
123+
content: "main.warning a.disabled"; }
124+
125+
main .warning a {
126+
content: "main .warning a"; }

tests/outputs_numbered/selector_functions.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,21 @@ main, .blog, :after {
109109
content: "main";
110110
content: ".blog";
111111
content: ":after"; }
112+
/* line 126, inputs/selector_functions.scss */
113+
a.disabled {
114+
content: "a.disabled"; }
115+
/* line 130, inputs/selector_functions.scss */
116+
a.disabled.outgoing {
117+
content: "a.disabled.outgoing"; }
118+
/* line 134, inputs/selector_functions.scss */
119+
{
120+
content: "null"; }
121+
/* line 138, inputs/selector_functions.scss */
122+
.warning main a, main .warning a {
123+
content: ".warning main a, main .warning a"; }
124+
/* line 142, inputs/selector_functions.scss */
125+
main.warning a.disabled {
126+
content: "main.warning a.disabled"; }
127+
/* line 146, inputs/selector_functions.scss */
128+
main .warning a {
129+
content: "main .warning a"; }

0 commit comments

Comments
 (0)