Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable LibSass specs for @content args #1313

Merged
merged 1 commit into from
Nov 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Error: wrong number of arguments (1 for 0) for `@content'
on line 2:3 of test.scss, in mixin `@content`
from line 2:3 of test.scss, in mixin `mixin`
from line 5:10 of test.scss
>> @content(value);

--^
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Error: Mixin @content is missing argument $arg1.
on line 2:3 of test.scss, in mixin `mixin`
from line 5:10 of test.scss
>> @content;

--^
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Error: Invalid CSS after "...) using ($arg1:": expected expression (e.g. 1px, bold), was ") {}"
on line 5:32 of test.scss
>> @include mixin() using ($arg1: ) {}

-------------------------------^
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Error: Mixin @content has no parameter named $invalid
on line 2:12 of test.scss, in mixin `@content`
from line 2:3 of test.scss, in mixin `mixin`
from line 5:10 of test.scss
>> @content($invalid: value);

-----------^
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Error: Invalid CSS after "...ude mixin using": expected "(", was "{}"
on line 5:16 of test.scss
>> @include mixin using {}

---------------^
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Error: Invalid CSS after "...ude mixin using": expected "(", was "$arg1 {}"
on line 5:16 of test.scss
>> @include mixin using $arg1 {}

---------------^
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Error: Invalid CSS after "@include mixin()": expected ";", was "() {}"
on line 5:16 of test.scss
>> @include mixin() () {}

---------------^
6 changes: 6 additions & 0 deletions spec/mixin/content/arguments/error/too_few_args/error-libsass
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Error: Mixin @content is missing argument $arg2.
on line 2:3 of test.scss, in mixin `mixin`
from line 5:10 of test.scss
>> @content(1);

--^
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Error: wrong number of arguments (3 for 2) for `@content'
on line 2:3 of test.scss, in mixin `@content`
from line 2:3 of test.scss, in mixin `mixin`
from line 5:10 of test.scss
>> @content(1, 2, 3);

--^
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Error: Invalid CSS after "... mixin using ()": expected "{", was ";"
on line 5:23 of test.scss
>> @include mixin using ();

----------------------^
2 changes: 0 additions & 2 deletions spec/mixin/content/arguments/options.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
:ignore_for:
- ruby-sass
:todo:
- libsass # sass/libsass#2723
28 changes: 28 additions & 0 deletions spec/mixin/content/arguments/receiving/output-libsass.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
with-defaults nothing-passed {
arg1: value1;
arg2: value2;
}
with-defaults partial-override {
arg1: value1;
arg2: other2;
}
with-defaults total-override {
arg1: other1;
arg2: other2;
}

with-splat nothing-passed {
positional: ();
keywords: ();
}
with-splat positional-passed {
positional: value1, value2, value3;
keywords: ();
}
with-splat named-passed {
keywords: (arg1: value1, arg2: value2);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed some output due to an existing issue with inspect'ing arglists that isn't related to this feature.

}
with-splat both-passed {
positional: value1;
keywords: (arg2: value2);
}